X-Git-Url: http://git.piffa.net/web?a=blobdiff_plain;f=oggi%2Fserial_hello_world%2Fserial_hello_world.ino;fp=oggi%2Fserial_hello_world%2Fserial_hello_world.ino;h=7f8e81464605ef8e02d80919056f71972b90acfe;hb=b3b834b9e512718c9ea40b56276e6e22ca097571;hp=0000000000000000000000000000000000000000;hpb=ca52c418b75db9cd1b868ee8942b8a3b016f08f2;p=sketchbook_andrea diff --git a/oggi/serial_hello_world/serial_hello_world.ino b/oggi/serial_hello_world/serial_hello_world.ino new file mode 100644 index 0000000..7f8e814 --- /dev/null +++ b/oggi/serial_hello_world/serial_hello_world.ino @@ -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() +} + + + +