]> git.piffa.net Git - sketchbook_andrea/blobdiff - basic/serial_debug/serial_hello_world/serial_hello_world.ino
operatori + analog
[sketchbook_andrea] / basic / serial_debug / serial_hello_world / serial_hello_world.ino
diff --git a/basic/serial_debug/serial_hello_world/serial_hello_world.ino b/basic/serial_debug/serial_hello_world/serial_hello_world.ino
new file mode 100644 (file)
index 0000000..7f8e814
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ *   Hello World!
+ *
+ * This is the Hello World! for Arduino. 
+ * It shows how to send data to the computer trough the serial connection
+ */
+
+void setup()                   
+{
+  Serial.begin(9600);           // Inposta la seriale a 9600 bps
+  // Se Arduino manda 9600 bit per secondo e devi manandare 12 Bytes di dati
+  // quanto tempo serve per mandare i dati?
+
+  // Try to change bond rate in the monitor
+
+  Serial.println("Hello World!");   // scrive hello world e ritorna a capo
+  
+  
+//  Serial.print("Il mio nome e': ");   // Scrive senza ritorno a capo
+//  Serial.println("Andrea");           // Scrive con ritorno a capo
+//  Serial.flush();                     // Assicura che tutto il testo venga scritto
+
+}
+
+void loop()                       
+{
+  // Provate a mettere i  Serial.printl() qui, magari con un delay()
+}
+
+
+
+