Interactive Arduino
From Wiki for Dragino Project
Introduction
Some times we may need to interactive with the Arduino remotly, for example, check some pins input and then change the output or behaviour accordingly. The Dragino MS12 provide an easy way to finish such work. The key software we use for this are:
- minicom : Terminal Emulator running in OpenWrt
- Bitlash : An open source interpreted language shell and embedded programming environment.
Example with Bitlashdemo
1/ Upload the Bitlashdemo on Arduino according to the instruction.
2/ Connect to connect the Arduino and the MS12 via UART.
3/ Install minicom in Dragino, make sure your Dragino connect to the internet , then run:
root@dragino:~# opkg update // update latest available package from OpenWrt root@dragino:~# opkg install minicom // install minicom.
then configure minicom by modifing the file /etc/minirc.dfl as below:
root@dragino:~# cat /etc/minirc.dfl # Machine-generated file - use "minicom -s" to change parameters. pu port /dev/ttyS0 pu baudrate 57600 pu bits 8 pu parity N pu stopbits 1 pu rtscts No
4/ run
minicom
then you will able to use bitlash shell to interactive with Arduino.
Welcome to minicom 2.3 OPTIONS: Compiled on May 28 2011, 04:01:38. Port /dev/ttyS0 Press CTRL-A Z for help on special keys > AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0 ------^ unexpected number > print "hello" hello > print 2+2 4 >