Devices & Components
ARDUINO UNO WiFi REV2
P10 white LED screen
Project description
Code
WiFi configurable P10 LED Screen
arduino
1. Connect to arduino Wifi 2. Use any web explorer to open: 192.168.1.240/arduino 3. Go to Wifi console. 4. Use the command to update the price: “actualizar/10.23” will show a price of $10.23
1/* 2 Daniel Grajales Garcia. 1 de abril de 2017. 3 BioHacking lab 4 at Hangar 5*/ 6#include <SPI.h> 7#include <DMD2.h> 8#include <fonts/Arial14.h> 9#include 10 <fonts/Droid_Sans_24.h> 11#include <UnoWiFiDevEd.h> 12 13#define DISPLAYS_WIDE 14 4 15#define DISPLAYS_HIGH 4 16 17SoftDMD dmd(DISPLAYS_WIDE,DISPLAYS_HIGH); 18 19String 20 valueInts = "00"; 21String valueCents = "00"; 22String valueStr = "$"; 23String 24 myValueToDisplay = "x"; 25 26 27// the setup routine runs once when you press 28 reset: 29void setup() { 30 dmd.setBrightness(250); 31 dmd.selectFont(Droid_Sans_24); 32// 33 dmd.selectFont(Arial14); 34 dmd.begin(); 35 dmd.drawString(1, 4, myValueToDisplay); 36 37 // Se inicializa la WiFi 38 Wifi.begin(); 39 Wifi.println("REST server is 40 up"); 41 myValueToDisplay = String(valueStr) + valueInts + "." + valueCents; 42 43 Wifi.println(myValueToDisplay); 44 45} 46 47void loop() { 48 myValueToDisplay 49 = String(valueStr) + valueInts + "." + valueCents; 50 51 dmd.drawString(1, 52 4, myValueToDisplay); 53 if(Wifi.available()){ 54 String command = Wifi.readStringUntil('/'); 55 56 if (command == "actualizar") { 57 Wifi.println("comando encontrado..."); 58 59 valueInts = Wifi.readStringUntil('.'); 60 valueCents = Wifi.readStringUntil('/'); 61 62 Wifi.println("Status: 200 OK\ 63"); 64 Wifi.print("El valor ahora 65 es: "); 66 Wifi.print(valueInts); 67 Wifi.print("."); 68 Wifi.println(valueCents); 69 70 Wifi.print(EOL); //char terminator 71 dmd.begin(); //limpiar 72 la pantalla 73 } 74 } 75 delay(50); 76} 77
WiFi configurable P10 LED Screen
arduino
1. Connect to arduino Wifi 2. Use any web explorer to open: 192.168.1.240/arduino 3. Go to Wifi console. 4. Use the command to update the price: “actualizar/10.23” will show a price of $10.23
1/* 2 Daniel Grajales Garcia. 1 de abril de 2017. 3 BioHacking lab at Hangar 4*/ 5#include <SPI.h> 6#include <DMD2.h> 7#include <fonts/Arial14.h> 8#include <fonts/Droid_Sans_24.h> 9#include <UnoWiFiDevEd.h> 10 11#define DISPLAYS_WIDE 4 12#define DISPLAYS_HIGH 4 13 14SoftDMD dmd(DISPLAYS_WIDE,DISPLAYS_HIGH); 15 16String valueInts = "00"; 17String valueCents = "00"; 18String valueStr = "$"; 19String myValueToDisplay = "x"; 20 21 22// the setup routine runs once when you press reset: 23void setup() { 24 dmd.setBrightness(250); 25 dmd.selectFont(Droid_Sans_24); 26// dmd.selectFont(Arial14); 27 dmd.begin(); 28 dmd.drawString(1, 4, myValueToDisplay); 29 // Se inicializa la WiFi 30 Wifi.begin(); 31 Wifi.println("REST server is up"); 32 myValueToDisplay = String(valueStr) + valueInts + "." + valueCents; 33 Wifi.println(myValueToDisplay); 34 35} 36 37void loop() { 38 myValueToDisplay = String(valueStr) + valueInts + "." + valueCents; 39 40 dmd.drawString(1, 4, myValueToDisplay); 41 if(Wifi.available()){ 42 String command = Wifi.readStringUntil('/'); 43 if (command == "actualizar") { 44 Wifi.println("comando encontrado..."); 45 valueInts = Wifi.readStringUntil('.'); 46 valueCents = Wifi.readStringUntil('/'); 47 Wifi.println("Status: 200 OK\ 48"); 49 Wifi.print("El valor ahora es: "); 50 Wifi.print(valueInts); 51 Wifi.print("."); 52 Wifi.println(valueCents); 53 Wifi.print(EOL); //char terminator 54 dmd.begin(); //limpiar la pantalla 55 } 56 } 57 delay(50); 58} 59
Downloadable files
Connection scheme between Arduino and Screen
arduino Ports connected to the P10 LED display
Connection scheme between Arduino and Screen

Connection Diagram
How to connect the panels.
Connection Diagram

Connection scheme between Arduino and Screen
arduino Ports connected to the P10 LED display
Connection scheme between Arduino and Screen

Comments
Only logged in users can leave comments