Does MegaPi can connect Raspberry Pi with USB cable?


#21

Hello yes the problem solved.
First you have to transfer the Firmware_for_MegaPi.ino to the MegaPi.
Then make the settings as described above on the Raspberry pi.
The next Python command should drive the robot

bot.encoderMotorRun (1.255)
bot.encoderMotorRun (2.255)


#22

@roboterpi - Yes, I was able to run the bot.encoderMotorRun(). However, the functions which have call backs. Like the bot.ultrasonicSensorRead(). I am not able to use it. The callbacks are not working.
I really want to use the Ultrasonic Sensor. I’m using a Raspberry Pi 3 and Python to run the codes. How were you able to read the Ultrasonic Sensor?
@tec_support - If you can guide too.


#23

Hi mizzi,

Actually, MegaPi only provides a interface for Raspberry Pi to make more possibility for geeks, due to the complexity of Raspberry Pi and Python program, I am afraid that we don’t have enough ability to support further except the existed instructions we provided on our Github page. Hope you can figure it out!


#24
from megapi import *

def onRead(v):
	print "distance:"+str(v)+" cm";

if __name__ == '__main__':
	bot = MegaPi()
	bot.start()
	while 1:
		sleep(0.1);
                bot.ultrasonicSensorRead(6,onRead);

#25

@tec_support- Well I am not a Geek. And your product said compatible with Raspberry Pi. We are trying this product to see if we can implement it in our curriculum for the students. If the system is so closed, then no point in purchasing more. This is non-starter for us. Your product description is deceptive.
The issue I was referring was from your so called Github page. The Ultrasonic Reader Example you provided on your Github page is not executing at all. I don’t like your response.


#26

@roboterpi - Thank you for getting back on this. I appreciate your follow up.
I tried this code. Its not jumping to the onRead() function. The call back from bot.ultrasonicSensorRead(6,onRead) is not executing. You are not facing any issues on this?
Thanks again.


#27