Serial communication Arduino

From my last post (Arduino-oled-display) I added a new function that allows me to send notification/messages from my terminal (linux) to my Arduino and it shows it through the little Oled screen. Here I will share the commands and code lines to get done the serial communication on your project. void loop() { while (Serial.available() > 0) { char recieved = Serial.read(); inData += recieved; // Process message when new line character is received if (recieved == '\n') { Serial.print("Arduino Received: "); Serial.print(inData); //digitalWrite(ledPin, HIGH); // if(inData == "HELLO\n") { // DON'T forget to add "\n" at the end of the string. Serial.println("HELLO"); //digitalWrite(ledPin, LOW); display.clearDisplay(); display.setCursor(0,0); display.setTextSize(2); display.print("Hi jose!"); display.display(); delay(3000); } inData = ""; // Clear received buffer } } }

2020-11-27

Display OLED Arduino

On this post I’ll explaining how to setup a little OLED screen 128X64 on Arduino Leonardo Tools: Chit: Arduino Leonardo Screen: Led OLED display 128x64 bought here Workstation: Silverblue Fedora 33 Compiler: Arduino IDE Over here you can see the connection diagram. Steps: Install the Arduino IDE from Flathub repo. Now you have the flatpak Arduino app, below you will see older information related to a bug of the last Arduino Flatpak version, but now it fixed. Please continue with the 3th step. 2. Launch the Arduino IDE: ...

2020-05-17