Digitspark Serial Monitor

Digitspark Serial Monitor

This page is to Setup and Config Digitspark Serial Monitor

Hardware and Software

Hardware

Digitspark and PL2303

Software

Arduino IDE

Sanki Notes

    • User SoftwareSerial : TX : P3, RX : P2

Examples

This example is ..........

            1. /*

            2. Software serial multiple serial test

            3. Receives from the hardware serial, sends to software serial.

            4. Receives from software serial, sends to hardware serial.

            5. The circuit:

            6. * RX is digital pin 2 (connect to TX of other device)

            7. * TX is digital pin 3 (connect to RX of other device)

            8. created back in the mists of time

            9. modified 9 Apr 2012

            10. by Tom Igoe

            11. based on Mikal Hart's example

            12. This example code is in the public domain.

            13. <SoftSerial> adapted from <SoftwareSerial> for <TinyPinChange> library which allows sharing the Pin Change Interrupt Vector.

            14. Single difference with <SoftwareSerial>: add #include <TinyPinChange.h> at the top of your sketch.

            15. RC Navy (2012): http://p.loussouarn.free.fr

            16. */

            17. #include <SoftSerial.h> /* Allows Pin Change Interrupt Vector Sharing */

            18. #include <TinyPinChange.h> /* Ne pas oublier d'inclure la librairie <TinyPinChange> qui est utilisee par la librairie <RcSeq> */

            19. SoftSerial mySerial(3, 2); // RX, TX

            20. void setup()

            21. {

            22. // Open serial communications and wait for port to open:

            23. // Serial.begin(57600);

            24. // while (!Serial) {

            25. ; // wait for serial port to connect. Needed for Leonardo only

            26. //}

            27. //Serial.println("Goodnight moon!");

            28. // set the data rate for the SoftwareSerial port

            29. mySerial.begin(9600);

            30. mySerial.println("Hello, world?");

            31. }

            32. void loop() // run over and over

            33. {

            34. mySerial.println("Sanki");

            35. /*

            36. if (mySerial.available())

            37. Serial.write(mySerial.read());

            38. if (Serial.available())

            39. mySerial.write(Serial.read());

            40. */

            41. }