Is ther an Arduino command interpreter running on Arduino already?

I know how to setup Web server or TCP server.

I want an interpreter running on Arduino that allows to execute Arduino commands interactively.

My first thought was to just allow commands like "analogWrite(2, 127)" or "digitalRead(1)".
But yesterday I stumbled over PicoC interpreter

that would give more of a shell around just being able to execute Arduino commands.

So on startup the Arduino would

  • read commands from Serial
  • interpret and execute the commands received

On computer running Arduino IDE

  • start serial monitor in Arduino IDE
  • send commands
  • receive and display command responses

I want to use that eg. for controlling motor over motor controller (direction, speed), and with the help of ESP8266 module do so wireless for motor test station, see [1] [2] [3]. PicoC would give shell like capabilities like loops for increasing speed gradually.

Does such Arduino command interpreter already exist?
Has anybody brought PicoC to Arduino yet?

Hermann.

Does such Arduino command interpreter already exist?

bitLash is one attempt. In general, such things are difficult to implement.

HermannSW:
I want an interpreter running on Arduino that allows to execute Arduino commands interactively.

Why ?

By that I mean, why do you want an interpreter as an alternative to the normal Arduino programming process?

There are generally two reasons why the Arduino does not have an interpreter - first, it has very little memory and the interpreter may use it all up leaving nothing for the user's program and, secondly it is likely to be very slow on a system which is generally intended to provide a real-time response to external events.

Have you considered using a Yun which could have Python on the Linux side to interface with your web server and use the Arduino side for control purposes?

...R

PaulS:
bitLash is one attempt. In general, such things are difficult to implement.

I know that such things are difficult, and I hoped for a solution you pointed to!
Thank you so much, I just tweeted on that.

Robin2:
Why ?

By that I mean, why do you want an interpreter as an alternative to the normal Arduino programming process?
...

I totally agree with you wrt interpreter vs. compiler in general -- that is exactly the reason why I do use Arduino IDE with my ESPs (8266-01 and 8266-12) and not NodeMCU (LUA is an interpreter), see this current thread on "NodeMCU vs. Arduino IDE".

But please see my three links above on the motor test station project I want to do, because of the speed I cannot have any cabling for control, and I do want interactive control to be able to

  • initiate emergency stops
  • set motor speed
  • set motor direction

I just tried to flash bitlash on my ESP8266-01, but compilation complains about

In file included from /home/stammw/Desktop/Arduino/arduino-1.6.4/libraries/billroy-bitlash-7d80a37/src/bitlash-cmdline.c:36:0,
from /home/stammw/Desktop/Arduino/arduino-1.6.4/libraries/billroy-bitlash-7d80a37/bitlash.cpp:49:
/home/stammw/Desktop/Arduino/arduino-1.6.4/libraries/billroy-bitlash-7d80a37/src/bitlash.h:54:20: fatal error: avr/io.h: No such file or directory
#include "avr/io.h"
^
compilation terminated.

My current plan is to

  • connect my 3.3V Arduino Pro Mini with ESP8266-01
  • play with some Arduino+ESP8266 Wifi webserver demos
  • downgrade those to rawTCP server demo as here
  • patch bitlash so that it ignores "+IPDx,s:" (x channel, s length)
  • patch bitlash so that it adds "AT+CIPSEND…" to responses
  • using bitlash on Arduino via netcat (nc) and Wifi via ESP8266 then to control motor controller/motor

Hermann.

HermannSW:

  • initiate emergency stops
  • set motor speed
  • set motor direction

These all seem to be things that would be a normal part of any Arduino program and I don't understand the role that an interpreted programming language might play. It would be easy to arrange to change the values with push buttons or potentiometers.

In particular, emergency stops are probably best handled directly without any MCU intervention - press the big red button, and power is OFF.

...R

Robin2:
… It would be easy to arrange to change the values with push buttons or potentiometers.

In particular, emergency stops are probably best handled directly without any MCU intervention - press the big red button, and power is OFF.

I am not sure how you want to press the button.
Motor, motor controller, Arduino, (ESP8266-01, missing here) and LiPos will be mouted on a wooden stick and that is moving!

Even a very short run of a 15V motor with only 9V showed 3m/s already, which is 10.8km/h:

(it is even fast if you view the video at quarter speed, wheel moves 1.33m per round)

And the idling speed of the motors is pretty high ["200.8km/h between my fingertips (micromotor, wheel)"]

not sure which high speed motor test station (MTS) will show.

But even 3m/s I would not want to stop by hand, therefore wireless control is a must for MTS.

I could write a program for wireless motor control, compile and run it.
But why should I do if eg. bitlash "d13 = 1-d13" allows me to toggle the LED state?
I do not need to reinvent the wheel for MTS.

Hermann.

Done!

See posting "WIFI REMOTE ACCESS INTO BITLASH COMMAND SHELL ON ARDUINO!" for details:
http://www.esp8266.com/viewtopic.php?f=8&t=3460

Hermann.

HermannSW:
I am not sure how you want to press the button.
Motor, motor controller, Arduino, (ESP8266-01, missing here) and LiPos will be mouted on a wooden stick and that is moving!

I'm glad you have a solution.

I guess I still don't understand what you are trying to do.

...R

I am one step further, "Completely wireless motor control via ESP8266 and Bitlash on Arduino Pro Mini "
http://www.esp8266.com/viewtopic.php?f=8&t=3460#p19796

As soon as the ordered 3.3V/5V level converters have arrived, I will mount all including motor controller onto the wooden stick. Then I can run motor test station (MTS) via netcat/telnet bitlash commands and max out motor speed (already have three motors, micromotor that does not start, 6-12V motor that has 7x torque of micromotor (MTS1 video) and 9-15V motor having 3x torque of previous one (MTS2 video)).

I will install another arduino fixed with IR light barrier and 4x20 ASCII display on MTS that will show current rpm and km/h of the tested motor.

Hermann.

Hi,
I know it's an old post...but in case someone is still wondering if there is an Arduino command interpreter out there...I made my own!
I

Have a look here: AVIL_shell

Ciao!