Start Program when done uploading


#1

Hello Makeblock Forum,

This is my first forum post. I hope I have selected the right category.

I have a MegaPi that is connected to a Raspberry Pi with a program that uploads and runs without any problems. As I have tested a lot with the Arduino Blink program, I have noticed that it starts as soon as the upload finishes. With my program I have to manually disconnect the robot from the USB port to start running. Is there a way to run my program as soon as it finishes uploading as it does with the Blink program? Thank you in advance.


#2

Hello again!

I have managed to fix this by additionally powering the MegaPi using the batteries alongside the power from the Raspberry Pi.
I am not sure whether this configuration can damage the board, but it works as intended for now.


#3

It sounds like you’re trying to run motors on the MegaPi, but without seeing your code that’s speculation on my part. If that is the case, the Raspberry Pi will not provide enough power to run the motors and external batteries will be required. This is a common issue with servos as well from my experience. :slight_smile:


#4

Yes I was using two Encoder Motors and an Ultrasonic Sensor. Is there a list where I can look up which components need batteries? Is it possible to damage the hardware using the two power sources simultaneously (Raspberry Pi and Batteries)?


#5

I’m unaware of a specific list (@tech_support, can you comment?). Generally speaking anything that is a large current draw (motors, servos) will need separate batteries. As long as the power is routed to the MegaPi board through the barrel connectors you should be okay.


#6

Check the module you connected how much voltage it requires. Without external battery, USB cable normally provides with 5V. Usually if it the module needs larger than 5V, external battery is required.


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.