-->
Page 1 of 3

WiFi remote access into Bitlash command shell on Arduino!

PostPosted: Sun Jun 07, 2015 11:39 am
by HermannSW
Hi,

in this arduino.cc forum thread I learned about Bitlash, a programmable command shell for arduino.

Yes, normally I prefer compiled code over interpreter, that is the reason why I use Arduino ESP8266 IDE and not NodeMCU for programming my ESPs. But the mentioned thread gives the reason why I want interpreter for "motor test station" project.

Because of the high speed and all parts moving I need wireless access to the Arduino. For this I wanted to make use of my ESP8266-01, just to access Bitlash over WiFi instead of serial.

Just few hours ago I was totally surprised that all that is needed is existing:
"Examples -> ESP8266 WiFi -> WiFiTelnetToSerial" demo does it all !

I only needed to change 3 lines of the demo:
    ssid definition
    password definition
    reduce "Serial" speed from 115200 to 57600 (Bitlash default speed), keep "Serial1" at 115200

I learned that the used "Serial1" is a transmit only serial interface, on pin GPIO2.
In the demo it gives the initial messages, which SSID it is connecting to, and which IP address it got from AP.

And the wiring was so easy(!) because I did use 3.3V Arduino Pro Mini and 3.3V USB2TTL:
Code: Select allESP8266-01   3.3V Arduino Pro Mini   USB2TTL(3.3V)
TX           RX                      -
GND          GND                     GND
GPIO2        -                       RXD
GPIO0        -                       -
RX           TX                      -
VCC          VCC                     -


I am really impressed that all I needed was already there (Bitlash, WiFiTelnetToSerial) and was so easy to get working together.

This shows remotely turning on Arduino LED by "d13=1", as well as Serial Monitor messages:
Image

And this is all together, powered completely by 3.7V LiPo:
Image
Hermann.

Re: WiFi remote access into Bitlash command shell on Arduino

PostPosted: Mon Jun 08, 2015 1:26 am
by HermannSW
"Completely wireless motor control via ESP8266 and Bitlash on Arduino Pro Mini "


After connecting with Bitlash on Arduino Pro Mini over netcat/telnet over ESP8266-01 WiFi, "pinmode(3,1)" and "a3=255" turns on motor at full (3V) speed. Other values like "a3=78" make motor run really slow or stop.

Still easy because running the motor at 3V only, not needing motor controller.

Hermann.

Re: WiFi remote access into Bitlash command shell on Arduino

PostPosted: Tue Jun 09, 2015 2:47 am
by tytower
Looks like there are plenty of wires to me !
What part is wirelessly driven?

Re: WiFi remote access into Bitlash command shell on Arduino

PostPosted: Tue Jun 09, 2015 9:40 am
by HermannSW
Hi,

the LiPo is connected to ESP8266-01 Wifi module, that is serially (RX/TX/VCC/GND) connected to Arduino Pro Mini, and that is connected (A3,GND) to micromotor.

But no other wires are connected, the laptop just does "telnet 192.168.4.26 21" to connect to WiFi chip, and then any command sent by telnet (eg. "a3=255" for full speed PWM) is just forwarded to Arduino Pro Mini, and Bitlash on that does executed the command and sets analog line a3 to value of 255. Any response a Bitlash command produces gets send back from ESP8266-01 to laptop telnet session over WiFi.

So the connection between computer running telnet/netcat and the youtube video system is what is wireless.

Hermann.