This is a blog mostly about techie things, what I am doing to my apartment network on the cheap, IOT, 3D Printing, Raspberry Pis, Arduinos, ESP32, ESP8266, Home Automation, Personal Weather Stations, Things That Go Bump in the Night, and some side issues that need discussing. Remember, sometimes the journey to an end is as much fun as the goal achieved!
Showing posts with label SSC-32. Show all posts
Showing posts with label SSC-32. Show all posts
Monday, April 22, 2013
Working on controlling the SSC32 from the Raspberry Pi
In light of the problems that I was having with reading the SSC32 pwm values from the Arduino, I thought that I might try and do the same via a serial interface to the RPi. That is where I ran into difficulty, mostly because I was rather busy this weekend with other things. I am trying to set up a serial terminal to communicate via a USB to RS232 interface cable to the SSC32 servo controller. I first tried Screen but couldn't figure out how to get it to work, then I tried minicom. I guess that I am just going to have to read up on these two programs in order to figure out the baud rate settings and commands. I will probably try to do the same types of commands via a connection to my laptop. But, I want to get it working on the RPi so that I can at least say it is part of the solution. Remember, controlling the SSC32 and Mini-Maestro to move servos was not a problem, finding out the current pwm for a given servo was.
Saturday, April 13, 2013
Command Testing for Serial Interface to Arduino
Ok, I have started implementing and testing the serial interface to the Arduino. So far, I have coded the following sequences:
(1) 1/1/pinNumber/analogRate - to write an analog rate to a specific pin
(2) 1/2/pinNumber/digitalState - to write a digital state to a specific pin
(3) 2/1/pinNumber - to read an analog value from a specific pin (via serial)
(4) 2/2/pinNumber - to read the digital state from a specific pin (via serial)
(5) 3/1/servoPin - to read the current pose of a servo from a specific pin (not active)
(6) 3/2/servoPin/servoPose - to write a pose to a servo on a specific pin (not active)
(7) 3/3/servoPin - to detach a servo on a specific pin (not active)
(8) 3/4/servoNumber - to read the pose on a specific servo channel on the maestro
(9) 3/5/servoNumber/servoPWM - to set the pwm pose on a specific servo channel on the maestro
(10) 4/1/lowSweepIR/highSweepIR/speedSweepIR -
At first I had some problems trying to get servos to react. I noticed that the servos were not zeroing at the beginning of the loop. It turns out that my connection to the mini-maestro was not working. After re-seating the connection everything started working correctly.
First test was the 3/5/servoNumber/servoPWM - worked correctly on two different servos (0 - for the Ultrasonic distance sensor, 6 - for the IR distance sensor). I added some instrumentation via the LCD Panel and was able to see what the command was being interpreted as. Servos moved, although there was a delay (I do have a one second feed in there).
Second test was to get the 3/4/servoNumber to work - although I could get some return values, they were not what I was expecting. Need to do a little more homework on return values from the maestro and how I am able to read that through a serial interface. I am getting absolutely nothing back from the Mini-Maestro. I am even using code that I know works with the device (according to websites that have the listings).
Update: Am I up against a hardware problem? If so, what is the least expensive way of implementing what I want. Should I go back to the SSC-32? The resolution in the analog domain was not that great, however, I am no longer using the Maestro to read the values from the IR or Ultrasonic distance sensors.
(1) 1/1/pinNumber/analogRate - to write an analog rate to a specific pin
(2) 1/2/pinNumber/digitalState - to write a digital state to a specific pin
(3) 2/1/pinNumber - to read an analog value from a specific pin (via serial)
(4) 2/2/pinNumber - to read the digital state from a specific pin (via serial)
(5) 3/1/servoPin - to read the current pose of a servo from a specific pin (not active)
(6) 3/2/servoPin/servoPose - to write a pose to a servo on a specific pin (not active)
(7) 3/3/servoPin - to detach a servo on a specific pin (not active)
(8) 3/4/servoNumber - to read the pose on a specific servo channel on the maestro
(9) 3/5/servoNumber/servoPWM - to set the pwm pose on a specific servo channel on the maestro
(10) 4/1/lowSweepIR/highSweepIR/speedSweepIR -
At first I had some problems trying to get servos to react. I noticed that the servos were not zeroing at the beginning of the loop. It turns out that my connection to the mini-maestro was not working. After re-seating the connection everything started working correctly.
First test was the 3/5/servoNumber/servoPWM - worked correctly on two different servos (0 - for the Ultrasonic distance sensor, 6 - for the IR distance sensor). I added some instrumentation via the LCD Panel and was able to see what the command was being interpreted as. Servos moved, although there was a delay (I do have a one second feed in there).
Second test was to get the 3/4/servoNumber to work - although I could get some return values, they were not what I was expecting. Need to do a little more homework on return values from the maestro and how I am able to read that through a serial interface. I am getting absolutely nothing back from the Mini-Maestro. I am even using code that I know works with the device (according to websites that have the listings).
Update: Am I up against a hardware problem? If so, what is the least expensive way of implementing what I want. Should I go back to the SSC-32? The resolution in the analog domain was not that great, however, I am no longer using the Maestro to read the values from the IR or Ultrasonic distance sensors.
Subscribe to:
Posts (Atom)