Code Monkey home page Code Monkey logo

arduino-serial-ui's Introduction

arduino-serial-ui

Arduino UI with OLED display, 4 led and two keys

arduino-ui-test-board

Arduino Nano V3.0 with FTDI UART works :-) for B&R PLC

Connection to B&R PLC's USB - serial access

FTDI is working fine for B&R USB connection

CP210x is NOT working for B&R PLC (tested with ESP Board and serial small USB Serial 5V adapter)
CH340 is NOT working for B&R PLC (tested with ESPDuino)
EPS8266 CP2102 --> Does not work for B&R PLC's

Search for if you try to rebuild: Nano V3.0 FT232 Chip ATmega328 Atmega328p 16M
Check there is not a CH340 build in.

Connection to Linux or Windows

For Linux or Windows all variants are working without any problems.

UART Settings:

  • 115200 Baud, SERIAL_8N1 (the default)

Serial Commands

Led Commands

4 led with commands. A sequence with multiple command is allowed. e.g 2p3f will show a pulse on led 2 and lets flash le3 3 10 times.

0,1,2,3 = select led, command is modal
x = off
o = on
p = 100ms puls
f = flash sequence 10 times fast
h = this help

Display Commands

To access the display to send texts to the display start with '@', this will forward all characters to the display.
With '#' and '|' you can change between small an big font.
'&' will clear the display.
To switch back to control the led use '^'.

^ = switch to led command
@ = switch to oled output
# = big font
| = small font
& = clear display
\ = new line

Key results

If the keys are pressed and released events are visible on the display and send to UART.

Following strings are send:

{"key0":true}  
{"key0":false}  
{"key1":true}  
{"key1":false}   

Wiring

led's

Led0 = BUILD IN LED
Led1 = D5
Led2 = D6
Led3 = D7

key's

Key0 = 11; //D11;
Key1 = 12; //D12;

OLED Display Wiring

ESP8266

NodeMCU 1.0
Flash Size: 4M(3M SPIFFS)

I2C Bus:
SCK = D1 = GPIO 5
SDA = D2 = GPIO 4

Arduino Nano

Old Boot loader !!!
"board": "arduino:avr:nano"
"configuration": "cpu=atmega328old"

I2C Bus:
SDA = A4
SCL = A5

Node-RED

Simple to test the Arduino UI is to use Node-RED.

node-red-sample

Import following JSON : test-flow-UART.json

update clone

If you clone this repo, to use node-red, you have to install node-red globally and then execute npm install in main folder and within node-red.

TIPS for beginners

work with GIT

push --> commit to GIT   
pull --> get from GIT

use commandos in VScode :-)

avoid extensive logs during compilation Arduino project in VScode

It seems the excessive debug logging is caused by running Java with -DDEBUG=true. Adding -DDEBUG=false to the C:\Program Files (x86)\Arduino\arduino_debug.l4j.ini fixes it for me.

microsoft/vscode-arduino#891

arduino-serial-ui's People

Contributors

thomaszehnder avatar

Stargazers

Zilong Zhao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.