-
Did you update the firmware on the MegaPi? I just got mine but that’s the first thing step before connecting it up to the raspberryPi. It might already be up-to-date but chances are it’s not, and then you can at least rule having old software on your MegaPi ruled out. If you need help, I can walk you through that… it’s not very difficult when you know where everything is.
-
I see you have the bluetooth module connected. Does the MakeBlock android/iOS app work? Even though you don’t have a “completed” project just pick the Robot Tank Arm and push forward or back to see if everything is connected correctly. (Port 1 maps to the right tank track in their example, so the motor will turn when you push forward/back)
-
Do you see the logs from the MegaPi Python module? Minimally you should see “init MegaPi” and no other lines indicating an error.
Finally, I just wanted to let you know I’ve noticed a bug in the firmware / latest release of MegaPi for Python. It will not effect the call you are trying to make now but you will run into the same issue soon. (like if you try to use the encoder motor functions that have callbacks). My strong suit is developing software, I just started to do this for fun and just got my MegaPi this weekend, I’m debugging the problem now and I can let you know when I fix it. Callbacks aren’t called and most of the time it’ll poop out after 1 serial call to the arduino chip.
I’ve got the MegaPi python module locally now & I’ve identified where the python framework is sending a byte to identify the motor for the callback (which is just the port combined with the #61, this maps to the encoder board in the firmware). Anyhow I send a byte to the functions that require an “extID” and the resulting callback only has 4 bits of the byte. In other words I send MegaPi a 61 through the serial port and it sends back a 13 when it should match what I send. (13 is the 4 right most bits of 61)
I’m hoping it’s something to do with a Raspberry Pi update, since MakeBlock also didn’t account for the change of Serial Port. FYI, you may eventually want to disable Bluetooth on the RaspberryPi so the original port that Makeblock expects is open for it to use (after I fix the bug, if it’s necessary I’ll let you know- the addresses have different baud-rates).
If I can’t fix it in MegaPi for Python then I’ll just look at updating their firmware to account for this. I should have time to look at it today. I’ll let you know when I figure it out, I know how frustrating it can be getting started.