Tutorial by Examples

This example listens for input coming in over the serial connection, then repeats it back out the same connection. byte incomingBytes; void setup() { Serial.begin(9600); // Opens serial port, sets data rate to 9600 bps. } void loop() { // Send data only when you receive...
String base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; void setup() { Serial.begin(9600); // Turn the serial protocol ON Serial.println("Start Typing"); } void loop() { if (Serial.available() > 0) { // Check if data has bee...
byte incoming; String inBuffer; void setup() { Serial.begin(9600); // or whatever baud rate you would like } void loop(){ // setup as non-blocking code if(Serial.available() > 0) { incoming = Serial.read(); if(incoming == '\n') { // newline, car...
If you have an Arduino connected to a computer or a Raspberry Pi, and want to send data from the Arduino to the PC you can do the following: Arduino: void setup() { // Opens serial port, sets data rate to 9600 bps: Serial.begin(9600); } void loop() { // Sends a line over serial: Se...

Page 1 of 1