what should be the next project:
- include I2C sensors/ output devices (temp barometers, more complicated things, multiple digital devices..).
- use the ESP8266 on MEGA, then UNO then mini Pro.. MEGA is easier to program with 2 serial ports.
any votes?
for i2c: the data schema would be:
command: i2
pin: X0 for write
values: 1. address; 2. byte; 3 ... byte to send to i2c device, if "-" use as delay in secs
pin: X1 for read
Values: 1. address, 2. # of bytes to read
the ARDUINO sketch would point the X0,X1 to the proper pins, i.e. UNO=A4/5 MEGA=D20,D21.. with a #ifdefined MEGA .. I2C X0=D21 ...
example:
curl http://192.168.1.x/"?i2:X0=122,17,23,-33,20&?" would write to address 122 two bytes: 17 and 23 and then delay 33 msecs and then write one byte 20
curl http://192.168.1.x/"?i2:X1=122,2&?" would read 2 bytes from i2c device# 122
that should cover any simple device like temp, pressure etc, but likely not displays or something like that .. but as a first step.. should be cool.
Other things we could do: scan i2c bus for device #s ; set device numbers .. but that is phase 3..
Karl