|
|
Hi. I write from switzerland because i need help. I would like upload a modified
program on my Lego old Spybotics, maybe u know what i need in hardware (cable,
plug,......) for that, via mac and MacNQC. Thanks for help, if its possible and
regards from swiss.
|
|
|
Hi all,
I recently got hold of a - previously ignored - Spybotics model (I never really
considered them to be of interest until I got one cheap and found the kids like
it).
Yes, they are fairly outdated, however they hook up to my Mac just fine over a
USB to serial adaptor and they do work with MacNQC.
Now there's two things I've found: One is the remote control is only of limited
use as it seems to go on strike after any program has been run on the Spybotics
brick (although apparently the remote can interfere with a running program, much
to the amusement of the kids). Lacking any kind of instructions for the set, I
am also unable to determine what the red button and the "other" setting of the
bottom lever on the remote are good for.
The other thing was worse: Apparently an old Spybotics can develop a faulty
touch sensor, and as that thing is completely integrated with the unit, it is
quite difficult to get at. I can offer a "hack", though:
When disassembling the Spybotics brick unscrewing the six bottom screws, you can
actually carefully lift up the front of the circuit board and the tongues of the
touch sensor become visible. When removing the plastic push button of the
sensor, you can see a small rubber part that acts as a spring between the button
and the contacts.
The easy fix I found (as I could not completely remove the circuit board without
using a solder iron) was to take out the rubber spring using a pair of tweezers,
and applying a thin stripe of 3M adhesive aluminum tape (the sort that has been
recommended to convert RC train track into 9V ;) ) on the back of that spring.
So far, the solution has proven fairly rugged (the kids _are_ tossing the
Spybotics model around in the kitchen). I may eventually disassemble the whole
thing for a permanent fix, but it seems like a quick and easy approach.
Regards,
Jerry
|
|
|
In lugnet.robotics.rcx.robolab, Mark Friedman wrote:
> No language war intended, but for now I'd rather use Robolab.
I don't know for certain but I would be a bit surprised if Robolab works with
the Spybot bricks. There would have to have been a new release with
modifications specifically made to support the Spybot. Searching these
newsgroups suggests that support for the Spybot was never added to Robolab.
http://news.lugnet.com/robotics/?n=23159
NQC, on the other hand, includes full support for programming the Spybot and API
functions designed specifically to take advantage of all the capabilities
specific to the Spybot brick.
> That said, if I change my mind I'd appreciate some tips on using MacNQC with
> Spybotics.
I'm not sure if MacNQC was updated with all the Spybot support but I think it
was. The BricxCC help files or the latest NQC Guide PDF file are probably your
best bet for learning what API functions can be used with the Spybot and how to
control its motors and sensors. BricxCC includes several small programs for the
Spybot written in NQC. BricxCC also supports programming the Spybot in LASM and
MindScript if you want to try something other than NQC.
> One of my biggest questions is whether I need to download
> firmware from the SDK to the Spybotics controller.
The Spybot firmware is onboard the brick permanently and it cannot be replaced.
There is no need (or ability) to download a firmware to the Spybot bricks.
John Hansen
|
|
|
In lugnet.robotics.rcx.robolab, Jetro de Chateau wrote:
> In lugnet.robotics.rcx.robolab, Mark Friedman wrote:
> > Does anyone have any experience using Robolab with a Spybotics kit? I just got
> > a couple of old Spybotics kits for my son this past Christmas and would love to
> > program them with him using Robolab. I have lots of programming experience,
> > although I am new to Robolab, Spybotics and robotics in general. Any tips or
> > links to useful information would be appreciated.
> >
> > Thanks in advance.
> >
> > -Mark
>
> I don't know if RoboLab will work with Spybotics, but if you have prior
> programming experience NQC may be a better option. It works great with
> Spybotics.
>
> Jetro
No language war intended, but for now I'd rather use Robolab.
That said, if I change my mind I'd appreciate some tips on using MacNQC with
Spybotics. Most of the stuff that I've seen on the web talks about using the
regular RCX stuff. One of my biggest questions is whether I need to download
firmware from the SDK to the Spybotics controller. All the stuff I see talks
about getting the firmware from the Mindstroms SDK for the Mac but the Lego
Mindstorms web pages for that SDK are long gone. I've downloded stuff from the
program that comes with Spybotics. Is that sufficient?
Thanks in advance.
-Mark
|
|
|
In lugnet.robotics.rcx.robolab, Mark Friedman wrote:
> Does anyone have any experience using Robolab with a Spybotics kit? I just got
> a couple of old Spybotics kits for my son this past Christmas and would love to
> program them with him using Robolab. I have lots of programming experience,
> although I am new to Robolab, Spybotics and robotics in general. Any tips or
> links to useful information would be appreciated.
>
> Thanks in advance.
>
> -Mark
I don't know if RoboLab will work with Spybotics, but if you have prior
programming experience NQC may be a better option. It works great with
Spybotics.
Jetro
|
|
|
Does anyone have any experience using Robolab with a Spybotics kit? I just got
a couple of old Spybotics kits for my son this past Christmas and would love to
program them with him using Robolab. I have lots of programming experience,
although I am new to Robolab, Spybotics and robotics in general. Any tips or
links to useful information would be appreciated.
Thanks in advance.
-Mark
|
|
|
In lugnet.cad.dat.parts, Philippe Hurbain wrote:
|
Linmix once said to me that he couldnt find a LDraw model of the
Spybotics... so I decided to cope with
that beast.
Here is the prevue:
The LDraw files are available from
LDraw Parts
Tracker. Dont forget all the subfiles!
Some LDrawers may wonder how I created the smooth front cover shape. I
started with a few hires 1-4edges, inlined them and modified their horizontal
alignment with MLCad:
Then I created stripes of polygons between each pairs of lines using
Coverer tool.
Missing conditional lines between the stripes were created using Lee
Gaiteris Edger to obtain the
nice smooth shape (using LDView smooth curves option).
Enjoy,
Philo
|
Philo,
Congratulations! This is a fantastic part! LDraw sure has come a long way
since its humble beginnings, and the ground breaking work by James.
Kevin
|
|
|
In lugnet.cad.dat.parts, Scott Wardlaw wrote:
> That is some seriously talented work! Can I ask how long it took you to create
> it?
Hard to tell... I worked on it on and off during 15 days. I would say about 10
hours.
Philo
|
|
|
That is some seriously talented work! Can I ask how long it took you to create
it?
Scott
|
|
|
In lugnet.cad.dat.parts, Philippe Hurbain wrote:
|
Linmix once said to me that he couldnt find a LDraw model of the
Spybotics... so I decided to cope with
that beast.
|
SNIP
Great to see that parts now on the PT. Thank you Philo!
cu
mikeheide
|
|
|
Linmix once said to me that he couldnt find a LDraw model of the
Spybotics... so I decided to cope with
that beast.
Here is the prevue:
The LDraw files are available from
LDraw Parts
Tracker. Dont forget all the subfiles!
Some LDrawers may wonder how I created the smooth front cover shape. I started
with a few hires 1-4edges, inlined them and modified their horizontal alignment
with MLCad:
Then I created stripes of polygons between each pairs of lines using
Coverer tool.
Missing conditional lines between the stripes were created using Lee Gaiteris
Edger to obtain the nice smooth
shape (using LDView smooth curves option).
Enjoy,
Philo
|
|
|
In lugnet.robotics.spybotics, Daniel Wittenaar wrote:
> Based on some code i found around here from John Barnes i rewrote his RCX2Manas
> control.
>
> Now it is cappable to control 3 manas units from 1 single spybot.
!
Then I will add two Spybotics nodes in to the 6 Mana/Legged robot I am building.
When I complete it would someone like to program it?
e
|
|
|
I'm sorry for pulling up such old post.
But i'm a regular spybot & bascom user too.. And i'm busy at the moment with the
same project. Maybe we can help eachother..
I'm also very intressted in the VLL source code in Bascom..
Daniel Wittenaar
Brickbash Robotics
|
|
|
Based on some code i found around here from John Barnes i rewrote his RCX2Manas
control.
Now it is cappable to control 3 manas units from 1 single spybot.
The next NQC code drives the motors of all of them just for demo..
You can build your own motor control scheme by calling the specific motor (em1 -
em6) Followed by EM_OFF, EM_FWD, EM_REV or EM_FLOAT.
Don't forget if you have the motors set to call 'task manas()'
Hopefully it will come handy for somebody.
Greetings,
Daniel Wittenaar
Brickbash Robotics
www.brickbash.nl
//Copyright by John Barnes making this programm for RCX use.
//Editted by Daniel Wittenaar - Brickbash Robotics for Spybotic use.
//For more information about the manas protocol go to
http://news.lugnet.com/robotics/?n=15809
#define MANAS_1 5
#define MANAS_2 6
#define MANAS_3 7
#define EM_FLOAT 0
#define EM_OFF 8
#define EM_FWD 7
#define EM_REV 15
int em1,em2,em3,em4,em5,em6; //Global motor control locations
task main()
{
// This demo starts the manas comms task, then loops forever.
// In the loop, it steps through three control phases setting
// the motors to off, and then paired forward and reverse.
start manas;
while (true)
{
em1=EM_OFF;
em2=EM_OFF;
em3=EM_OFF;
em4=EM_OFF;
em5=EM_OFF;
em6=EM_OFF;
Wait(100);
em1=EM_FWD;
em2=EM_REV;
em3=EM_FWD;
em4=EM_REV;
em5=EM_FWD;
em6=EM_REV;
Wait(100);
em1=EM_REV;
em2=EM_FWD;
em3=EM_REV;
em4=EM_FWD;
em5=EM_REV;
em6=EM_FWD;
Wait(100);
}
}
// The manas task continuously resends the motor settings.
// When the Spybotic is halted, this task stops and the manas
// motors automatically shut off
task manas()
{
while (true)
{
// First ensure serial settings are still ok
SetSerialType(SERIAL_TYPE_USER);
SetSerialBaud(SERIAL_BAUD_4800);
SetSerialChannel(SERIAL_CHANNEL_IR);
SetSerialChecksum(SERIAL_CHECKSUM_SUM);
// Set the first unit two message bytes and send them
SetSerialData(0,MANAS_1*0x10+em1);
SetSerialData(1,em2*0x10+0x10-((MANAS_1+em1+em2)&0xf));
SendSerial(0,2);
// Set the second unit two message bytes and send them
SetSerialData(0,MANAS_2*0x10+em3);
SetSerialData(1,em4*0x10+0x10-((MANAS_2+em3+em4)&0xf));
SendSerial(0,2);
// Set the third unit two message bytes and send them
SetSerialData(0,MANAS_3*0x10+em5);
SetSerialData(1,em6*0x10+0x10-((MANAS_3+em5+em6)&0xf));
SendSerial(0,2);
// Delay for a while so we can resend them regularly
Wait(10);
}
}
|
|
|
In lugnet.robotics.spybotics, Joe Strout wrote:
|
In lugnet.robotics.spybotics, Steve Hassenplug wrote:
|
On Thu, November 3, 2005 12:14 pm, Joe Strout wrote:
|
It occurred to me that one might fit some sort of light sensors on top of
some of the six LEDs on the Spybots top side, and use this to select an
input channel to route information from any of a number of sensors to the
VLL sensor.
Has anybody tried this yet? Any thoughts on how well this would work, or
pointers to a suitable multiplexer circuit?
|
You can control the VLL output of the spybot, so you should be able to just
connect something much like the programming cable, and get two-way
communications.
|
Two-way communications with what? Are you picturing some sort of
microcontroller that monitors all the extra sensors, and reports values to
the Spybot upon request?
That sounds beyond my capabilities, as well as probably not as fast as the
multiplexer approach. With the latter, to read (say) one of sixteen inputs,
you just set the four LEDs to address the desired input, then take a reading
from the VLL.
To communicate with a microcontroller, youd instead have to send the
request, then wait for a reply, both using a serial protocol. I imagine that
for some applications, polling the sensors as fast as possible would be
helpful -- but I havent actually done the math, so maybe this isnt actually
relevant.
|
Heres a good VLL page:
http://www.elecbrick.com/lego/
|
Thanks Id seen that before, but hadnt realized its relevance to
Spybotics. Hmm... that suggests all sorts of fun things one might do, like
printing VLL codes onto a transparent wheel which you then spin in front of a
light (using a standard LEGO motor), making a beacon that not only
advertises its presence but transmits information (identity or commands) too.
Best,
- Joe
|
Some time ago, I have sugested the use of the VLL port to make an interface to
connect a couple of lego light sensors to the spybot. The ideea was to have an
analog device (powered by a 9V bov) that would just switch on a sensor, then
switch it off and turn on a LED that would shine proportional with the amount of
light sensed by the light sensor. This LED would be connected to the spybots
light sensor, which in turn would make the spybot light sensor sense about the
same light intensity as the Lego light sensor. Now using the spybots LED from
the VLL port, and having a fototransistor connected to it, it can trigger a gate
to select which Lego light sensor would be read. I hope it makes sense...
After playing with other microcontrollers, I just realised that this aproach is
too complicated. A simple 8 pin PIC would do the trich much easier and is not
more expensive. I did not built it yet. Other projects got in the way, but
eventualy I will build one.
Gabe
|
|
|
In lugnet.robotics.spybotics, John Hansen wrote:
> It is possible if you are really clever to write an
> NQC program which cooperates with the built-in ROM tasks and subroutines.
I spent some time recently working on NQC headers which would enable using more
(if not all) of the Spybot ROM subroutines and tasks with a NQC program. I
haven't done extensive testing of the headers in real programs. I hope there
are still a few Spybot users out there who might be willing to test them a bit
more than I have. There are 4 header files:
SpyGlobals.nqh
SpyInteraction.nqh
SpyBeads.nqh
SpyEvents.nqh
SpyGlobals.nqh includes SpyInteraction.nqh and SpyBeads.nqh. The header files
make use of the NQC preprocessor quite a bit to make sure that global variables
are correctly reserved and defined. The SpyEvents header file also hooks up a
special spybot event initialization routine. You can get these headers at
http://bricxcc.sourceforge.net/spynqh.zip. If you test them please let me know
if you run into any problems.
I also have a port of the Mindscript code for the Task 0 program in ROM to NQC
in the file builtin.nqc. Here it is:
#include "SpyGlobals.nqh"
#include "SpyEvents.nqh"
#define right 0 // output 1
#define left 1 // output 2
#define cAdvance 1
#define cRetreat 2
//int nMode;
#pragma reserve 9
#define nMode (@9)
task main()
{
// initialize our global variable
nMode = cAdvance;
SetPriority(2);
ResetMotors();
ResetEngine();
nStatus |= EVENT_RUNBEADS;
SetAnimation(ANIMATION_SCAN);
repeat(2)
{
PlayTone(2232, 10); Wait(20);
PlayTone(1736, 10); Wait(20);
PlayTone(1202, 10); Wait(35);
PlayTone(1202, 10); Wait(20);
PlayTone(1736, 10); Wait(20);
PlayTone(2232, 10); Wait(35);
}
SetLED(LED_MODE_ON, 0);
ResetMessages();
start MyPostWatcher;
// StartTask(cBuiltInPostWatcher);
start MyBumpWatcher;
// StartTask(cBuiltInBumpWatcher);
while(true)
{
SelectTarget();
if (Target(SPY_RANGE) > RANGE_ANYWHERE)
{
if (nMode == cAdvance)
{
if (Target(SPY_RANGE) == RANGE_THERE)
PlaySound(SOUND_MAGNET);
Advance_Bead(RANGE_HERE, 100);
}
else
{
if (Target(SPY_RANGE) == RANGE_HERE)
PlaySound(SOUND_REPULSE);
Retreat_Bead(RANGE_HERE, 100);
}
}
else
{
BasicMovement_Bead(MOVE_BASIC_SPIN_LEFT, 50);
Fx_Bead(FX_TWITTER, 25);
RandomMovement_Bead(MOVE_RANDOM_FORWARD, 100);
FancyMovement_Bead(MOVE_FANCY_BUG_FORWARD, 1, 100);
Wait(25);
}
}
}
task BumpWatcher()
{
}
task PowerUpTask()
{
int nLevel = EEPROM(EEPROM_USERLEVEL);
SetLED(LED_MODE_YELLOW, 0);
Wait(50);
if (nLevel < 16)
{
nStatus = EVENT_RUNBEADS;
CountDown_Bead(nLevel, COUNT_DIR_UP, 50);
}
ResetMotors();
Wait(100);
}
task MyPostWatcher()
{
while (true)
{
monitor(EVENT_MASK(PostEvent))
{
Wait(32767);
}
catch
{
SetPriority(0);
if ((RxMessageChannel() & MSG_IR) > 0)
{
SetRxMessageLock(MSG_IR);
if (RxMessage(MSG_IR, MSG_COMMAND) == COMMAND_CONTROLLER)
{
nControllerButton = RxMessage(MSG_IR, MSG_HI_BYTE);
nControllerButton *= 256;
nControllerButton |= RxMessage(MSG_IR, MSG_LO_BYTE);
}
switch(nControllerButton)
{
case CONTROLLER_BUTTON1:
PlayTone(3401, 3);
nMode = cAdvance;
break;
case CONTROLLER_BUTTON2:
Fire_Bead(CMD_FIRE_LASER,FIRE_TYPE_THERE_NARROW,-1,0,0,SOUND_FIRE_LASER,50);
break;
case CONTROLLER_BUTTON3:
PlayTone(2801, 3);
nMode = cRetreat;
break;
}
SetRxMessageLock(MSG_NONE);
}
}
}
}
task MyBumpWatcher()
{
while (true)
{
monitor(EVENT_MASK(BumpEvent))
{
Wait(32767);
}
catch
{
SetPriority(1);
PlaySound_Bead(SOUND_OUCH, 0);
BasicMovement_Bead(MOVE_BASIC_BACKWARD, 50);
BasicMovement_Bead(MOVE_BASIC_SPIN_RIGHT, 50);
}
}
}
|
|
|
In lugnet.robotics.spybotics, Steve Hassenplug wrote:
|
On Thu, November 3, 2005 12:14 pm, Joe Strout wrote:
|
It occurred to me that one might fit some sort of light sensors on top of
some of the six LEDs on the Spybots top side, and use this to select an
input channel to route information from any of a number of sensors to the VLL
sensor.
Has anybody tried this yet? Any thoughts on how well this would work, or
pointers to a suitable multiplexer circuit?
|
You can control the VLL output of the spybot, so you should be able to just
connect something much like the programming cable, and get two-way
communications.
|
Two-way communications with what? Are you picturing some sort of
microcontroller that monitors all the extra sensors, and reports values to the
Spybot upon request?
That sounds beyond my capabilities, as well as probably not as fast as the
multiplexer approach. With the latter, to read (say) one of sixteen inputs, you
just set the four LEDs to address the desired input, then take a reading from
the VLL.
To communicate with a microcontroller, youd instead have to send the request,
then wait for a reply, both using a serial protocol. I imagine that for some
applications, polling the sensors as fast as possible would be helpful -- but I
havent actually done the math, so maybe this isnt actually relevant.
|
Heres a good VLL page:
http://www.elecbrick.com/lego/
|
Thanks Id seen that before, but hadnt realized its relevance to Spybotics.
Hmm... that suggests all sorts of fun things one might do, like printing VLL
codes onto a transparent wheel which you then spin in front of a light (using a
standard LEGO motor), making a beacon that not only advertises its presence
but transmits information (identity or commands) too.
Best,
- Joe
|
|
|
On Thu, November 3, 2005 12:14 pm, Joe Strout wrote:
> It occurred to me that one might fit some sort of light sensors on top of some
> of the six LEDs on the Spybot's top side, and use this to select an input
> channel to route information from any of a number of sensors to the VLL sensor.
>
> Has anybody tried this yet? Any thoughts on how well this would work, or
> pointers to a suitable multiplexer circuit?
You can control the VLL output of the spybot, so you should be able to just connect
something much like the programming cable, and get two-way communications.
Here's a good VLL page:
http://www.elecbrick.com/lego/
Steve
|
|
|
It occurred to me that one might fit some sort of light sensors on top of some
of the six LEDs on the Spybots top side, and use this to select an input
channel to route information from any of a number of sensors to the VLL sensor.
Has anybody tried this yet? Any thoughts on how well this would work, or
pointers to a suitable multiplexer circuit?
Thanks,
Joe
|
|
|
In lugnet.robotics.spybotics, Joe Strout wrote:
|
Ill keep yall posted on my progress, so if somebody else comes along later
in the same boat, they can learn from my mistakes!
|
Well, heres one: dont buy a Dynex USB-to-serial adapter. The packaging and
web site both claim its Mac compatible, but I tried it on two different
machines (a G4 Powerbook running 10.2.8 and a dual G5 desktop running 10.3.9),
and two different serial apps (MacNQC and an app I wrote myself a while back to
test serial devices), and neither one sees this Dynex gadget as a serial port at
all.
I called Dynex tech support, and they were very nice, but utterly unhelpful.
Their answer amounted to, It should just work. Well, it doesnt.
Everything I read indicates that the Keyspan USA-19HS is the right gizmo to
use. Its a bit hard to find in the stores Im going to have to order mine
online but I bet it will work reliably. More later when I have positive
results.
Best,
Joe
|
|
|