Hi I bought a VR408 kit a few days ago. My goal would be to use it with the Scratch programming environment.
Everything worked fine (with a few small issues but not impossible) up to the last step:
When connecting to the robot from Scratch and running a command - the first gets executed correctly and NO other command works afterwords (like the serial communication gets broken completely)…
The only error I had when following the installation and connection tutorial was a warning of compilation for the Scratch Sketch.ino:
" warning: attempt to free a non-heap object ‘BOT’ [-Wfree-nonheap-object]
Anyways that is JUST a warning and the connection seems to work (for a command ONLY) …
Does anybody have ANY ideas on what should I do to correct this ?
hi!
are you using a laptop?
If so please try disconnecting t the power supply of your laptop. And reconnect the allbot with your laptop. Also restart the communicator
Yes I am using a laptop. I just tried what you suggested - unfortunately with the same result !
For a more detailed description of this problem, this is what I’m doing (step by step):
with my laptop power wire plugged off:
connect my robot on USB - chirp sounds signals correct VR408Scratch is loaded
power on the robot (from the VRBS1 shield button) - the robot stands up
start the Allbot communicator software = the robot restarts (powers off and on again with chirp and standup)
press Connect from within the Communicator software - the robot restarts again (powers off and on again with chirp and standup)
start Scratch - import extension
IF I did the above fast enough (within 30 seconds or so) - I get two or at most 3 Scratch commands executed. After a while - NO new command gets executed anymore and whenever I click within Scratch on a command it gets like this:
until I click it again…
Its like the serial communication is not working anymore and I have to REDO all the above…
Any other ideas ?
Thank you again for your time and effort,
Best regards,
Dan
On the update function which is called continuously - there is a send status call that is also called continuously ! This command sends the status of the arduino pins in a loop (forever) which fills the buffer of the Serial port within a few seconds or so…
You can check this by opening a Serial Monitor from the Arduino IDE and setting the speed to 115200 (the speed setup in the Vr408Scratch in the setup() )
Now - this was most probably a debug code - the idea is that we do not need it. and It DOES interfere with the robot controlling and therefore should be commented (as it is in the code above)…
I AM a bit disappointed by Velleman though for not properly solving this - I had to solve it all by myself !