Scratch Not Connecting to GoPiGo


#1

I am trying to get my Grandson’s GoPiGo to the point where he can start programming it.
Currently, the GoPiGO is working fairly well with the Python demo programs (only quirk is that left is right and right is left).
But I can’t seem to get Scratch (GoPiGo_Scratch_Start) to connect to the GoPiGo. It gives the following:
GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

I get the same messages if Scratch is running or not so currently we are unable to use Scratch to control the GoPiGo…


#2

Hey Streckerja,

Glad to hear that the GoPiGo is working! The first thing you bring up:

Currently, the GoPiGO is working fairly well with the Python demo programs (only quirk is that left is right and right is left).

YOu can correct this by switching the the motors placement on the back for the board. If you simply reverse the pins, the direction will change. Remember that the batteries are on the back of the robot.

I get the same messages if Scratch is running or not so currently we are unable to use Scratch to control the GoPiGo..

Just to check, are you using the latest version of Raspbian for Robots for your operating system? This error you bring up can occur when you don’t have broadcast in Scratch setup. The easiest thing to do is to open on of the examples in the Scratch folder of the GoPiGo/Software folder. If you open one of these, the examples should already have broadcast setup.

Let us know how that works. If it doesn’t, we have one more trick up our sleeve to share. :slight_smile:


#3

I tried to run GoPIGO_Basic_test.sb – It said the sensors were connected but when I tried to move the GoPiGo, nothing happened. I believe that I have the latest Rasbian, as I did an update and upgrade.


#4

Hey,
Was the scratch communicator running from either the Desktop or the GoPiGo scratch folder: https://github.com/DexterInd/GoPiGo/blob/master/Software/Scratch/GoPiGoScratch.py and if so can you post the output that you were getting in the terminal.

-Karan


#5

The first thing I come up with is the message from Python is:
File “GoPiGoScratch.py”, line 45, in <module>
import line_sensor as 1
Import Error: No module named line_sensor


#6

I modified the python program by setting en_line_sensor = 0 so that it wouldn’t load the line_sensor module.
the following is the result:

GoPiGo Scratch: Current firmware version: 1.3
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled
GoPiGo Scratch: Unable to Broadcast
GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled

GoPiGo Scratch: Scratch connection error, Retrying
GoPiGo Scratch: Scratch is either not opened or remote sensor connections aren’t enabled


#7

Hey,
Did you try right clicking the blue sensor value block and enabling the remote sensor connections in Scratch?

-Karan


#8

I bring up Scratch. Load the Scratch Program GoPiGo_Basic.sb
It says that the sensors are enabled…
I then run GoPiGoScratch.py that I had modified so that it didn’t load the line_sensor module
It says: Connected to Scratch Successfully
At this point, none of the scratch commands for motion or turning on LEDs work.


#9

Hey,
What firmware version do you have on your GoPiGo? Cab you check that by running ‘f’ command here: https://github.com/DexterInd/GoPiGo/blob/master/Software/Python/basic_test_all.py . Also, does the GoPiGo work normally with python. Did you try using the sample scratch commands shown in the Readme here: https://github.com/DexterInd/GoPiGo/tree/master/Software/Scratch.

-Karan


#10

As in the previous post, it shows that I am running Firmware version 1.3 (Cmd:f V 1.3)
Yes, GoPiGo works normally with python.
Yes, I ran the GoPiGo_Basic.sb which is supposed to implement the sample scratch commands… None of the commands worked.


#11

Hey,
I just tried running the scratch communicator with the GoPiGo and the example programs and it is working on my end. Do you get the command output on the terminal similar to the one I have attached. Like if you give forward command in Scratch, does it come up on the terminal.

Also, have you tried using our custom image for the Raspberry Pi from here: https://drive.google.com/file/d/0B0WChwP4CnLBWm9kNHFpem1qdm8/view?usp=sharing . It might be easier to get it working with our SD card.

-karan


#12

I have your SD Card. I purchased the complete kit in Sept. I tried your approach of running GoPiGoScratch.py first and then starting Scratch and loading GoPiGobasic.sb. This sequence works! However, as shown in the attached, I didn’t get any feedback as to the commands in the terminal window.


#13

Can you check if the debug mode is enabled in the scratch: https://github.com/DexterInd/GoPiGo/blob/master/Software/Scratch/GoPiGoScratch.py#L40 , en_debug should be 1 and then try again. For some reason it is not showing any output when it gets the broadcast signal from scratch.

Also, can you make sure that you have the latest version of the software installed. An easy way to do this would be to delete the GoPiGo folder from the Desktop sudo rm -r GoPiGo and then clone the repository on the Desktop again: sudo git clone https://github.com/DexterInd/GoPiGo.git.

-Karan


#14

I have updated as above. Still had to modify GoPiGoScratch.py to remove loading the line sensor as I don’t seem to have that module. Also, I updated my BrickPi installation using the Di Update and it worked great… It asked if I wanted to update the Dexter software, and I did. My Brick Pi is based on an image I downloaded from Dexter but the GoPiGo version came on the SD card. The GoPiGo version updated Raspbian and a few of the icons, but doesn’t provide the same interface to Scratch. The BrickPi asks which Robot Platform I am using and loads up the proper .py file then loads Scratch… How cai I get this functionality on the GoPiGo?


#15

Hey Streckerja, thanks for letting us know!

Do you have two different sd cards for the two different robots? If that’s how you have it setup, can you also update the one you run on the GoPiGo with the DI Update? that should provide the same smooth interface for Scratch for the GoPiGo.


#16

Yes, I have different cards for each. My BrickPi card was setup from a Raspbian for Robots download while the GoPiGo card cane with the GoPiGo. The DIUpdate on the GoPiGo says that I am missing the RandR extension and it goes right to downloading Raspbian for robots and reboots so it never goes to the point of updating the DI software which would provide the smooth Scratch interface.


#17

Hey streckerja, I’ll have to look at that. I thought I had hooked everything up correctly so that it would automatically transfer from the old version to the new, but I might have missed something. I’ll try it out again one more time.

Your best bet to get the udpated functionality for the GoPiGo in Scratch might be to download and burn a copy of the latest software to your sd card for the GoPiGo.


#18

As I say, on my BrickPi it worked just fine, but no so on the GoPiGo. I just re-ran the di_update on the GoPiGo and captured 3 screen shots. Before, During, and after re-boot. Note: after re-boot the name is still Raspberry and not Dex! I will try a new SD card with the Rasbian for Robots.


#19

I might have hit on something… I just realized the the uSD card is only 4G. There may not be room to upgrade as such. Downloading new 2015.11.09_DexterIndustries_weezy.img to the 4G card to see if it works. My BrickPi is on a 64G card!


#20

Download of new Raspbian image is working fine! Thanks

P.S. Will you be upgrading to Jessie any time soon?