lundi 19 octobre 2015

Micromite over the air!

Yes, I like the Micromite IC and especially the MKII version.

The main page of the Geoff's site.

It's about time to create a usefull aplication with.
So, why not to use this circuit with a wifi connection?

Ok, let's go : one wifi board ESP-01 available for a few dollards on the web; a micromite MKII dev board available here; and a tiny LCD display for autonomous use.

The WIFI module.
We need to change the firmware of the ESP-01 to provide a very easy to use serial like communication. You can find all the informations about this procedure at Jeelabs site. And, that's all.

I connected the ESP8266 board with the COM1 basic port of the Micromite, and a 2x16 LCD display as it's explained in the MKII Basic manual.

Some lines of BASIC :

SetPin 15, DOUT
Open "COM1:115200" As #1
Pin(15) = 1

LCD init 18,14,3,25,16,17
Cmd = 0

  Line Input #1, dat$
  Select Case dat$
    Case "led_on"
      Pin(15) = 0
      Cmd = Cmd + 1
      Print #1, "Command nunber ", Str$(Cmd)
      Print #1, " ->Led ON"
      LCD 2, 1, "                "
      LCD 2, 1, Str$(Cmd)
    Case "led_off"
      Pin(15) = 1
      Cmd = Cmd + 1
      Print #1, "Command number ", Str$(Cmd)
      Print #1, " -> Led OFF"
      LCD 2, 1, "                "
      LCD 2, 1, Str$(cmd)
    Case Else
      Print#1, "Enter led_on or led_off"
  End Select
Rem  EndIf

It's not a very efficient basic program but I realized this in five minutes.

To test the system, simply connect with a telnet programm at (not the week-end) and switch ON or OFF the led on board, and see the result in your telnet emulator. On my side, I can follow the number of operations directly to the display.

Funny and easy to realize!

I plan to create a more complexe board with a FCC ESP8266 module to take control of my house!

Aucun commentaire:

Enregistrer un commentaire