Next version 'Nixie' is coming soon !

Help us to get ready with MyRobotLab version Nixie: try it !

 

Here I'll go over several issues I have found with the Arduino service & WIndows 7 (64 bit)

FTDI Driver strangeness & Jumpy Oscope

After updating my driver at some point (or unknowingly being updated by Windows) I noticed the Arduino Oscope behaving very strangly.  When I selected a trace on the Arduino to display, the trace line would freeze, then flash quick, then pause, then flash - nothing like the smooth behavior it had previosly.

Hey,

I have x64 bit OS running on one of the builds you have on the bleeding edge.

I am not sure if my setup is fully functional.... but I get it to work most often and sometimes have to kill the java process manually to get it to release the serial port....

I'm having fun with this and learning a little more each day.

My question is how can I talk to the Arduino with a direct serial connection via  realterm or equivalent terminal when running the arduinoserialbare.pde on the microcontroller.  

MRL runs on a JVM and can communication to the Arduino micro-controller through a serial port.  MRL controls the Arduino through a serial protocol.  

MRL to Arduino uses a 3 byte command set

msg[0] = METHOD
msg[1] = PARAM1
msg[2] = PARAM2

The Motor service gui is being updated.  It has been designed to support multiple motor controllers. This is nice, since there can be a little complexity in attaching a motor to a motor controller.

For example an Arduino can directly drive a simple 2 bit H-bridge connected to a DC motor.  Or a motor shield can be used, which has its own motor port configuration.  Other shields and bridges might have different configuration.

Javadoc link
Example code (from branch develop):
#########################################
# AdafruitMotorShield.py
# description: motor control
# categories: motor control
# more info @: http://myrobotlab.org/service/AdafruitMotorShield
#########################################
# virtual = True
port = "COM99"
 
# virtual hardware
if ('virtual' in globals() and virtual):
    virtualArduino = runtime.start("virtualArduino", "VirtualArduino")
    virtualArduino.connect(port)
 
# The AFMotor API is supported through Jython
fruity = runtime.start("fruity","AdafruitMotorShield")
 
# connect the arduino to serial com port 3
fruity.connect(port)
 
# create a motor on port 4 of the AdaFruit board
motor1 = fruity.createDCMotor(4)
 
# move forward at 40% power
motor1.move(0.4)
 
sleep(1)
 
# move reverse at 50% power
motor1.move(-0.5)
 
sleep(1)
 
# stops motor
motor1.stop()
 
# stops motor and locks it so it can not
# be moved until it is unlocked
# motor1.stopAndLock()
 
# unlocks motor
# motor1.unlock()
 
# sets max power regardles of move command
# this will allow the motor to go at max 90%
# full power forward or reverse
# motor1.setMaxPower(0.9)

The  Adafruit Motor Shield is a service which will create a number of sub services.  It will create 4 Motor, 2 Servo, and 1 Arduino service.  This shield uses its own library, so MRLComm.ino will need to be modified.
Fortunately, the Arduino service will have the modified MRLComm.ino pre loaded in its editor.  This will need to be compiled & uploaded into the Arduino.

Here's a portion of a screencap I made while trying to sort out some driver/hardware issues.

Basically, it's a matrix of versions of the same software arranged by where they were procured from.  But first, a little explanation might be in order.

Quiet computer's USB powering the RasPi

Noisy computer's USB powering the RasPi

2012.10.04 
WooHoo ! - This is a picture of data streaming from an Arduino connected to the Raspberry Pi (running MRL  instance RasPi) connected to my PC (running MRL instance MRL76732)