I am an engineering student working with robotics. I am working with an arduino uno, some servos, and some basic light detectors and switches. The issue that I am having comes in with my choice of programming language. I am trying to write my code in MatLab because of what I want to do with the data that I gather. I have been unable to make my code run on the arduino without having it plugged into the computer. My code works great when I have the arduino plugged in to my computer, I just do not want to have to follow it around with my laptop like I am walking a dog. Does anyone know how I can add my program to the memory onboard my arduino so that my robot can run indepently from my computer? Thanks in advance to anyone who takes the time to read my post!
To the two people who replied to me, I have sufficient power supplies for both the Arduino and the servos, and adding Bluetooth/WiFi will not solve the problem that I am having. My problem comes in when trying to get the Arduino to act as a standalone piece of hardware.
I have no experience with MatLab, but I'm wondering what it actually means when you say "trying to write my code in MatLab".
The only way I know of to program an Uno is to compile its code (in the ide) and load it into the Arduino memory where it runs as long as there's power.
Maybe you could explain the actual relationship between Matlab and the Arduino, particularly what it means to be programming an Arduino in Matlab.
I have a feeling that perhaps there is an Arduino sketch running (in fact there surely must be if it's moving around?) and Matlab is providing some data that the Arduino digests and acts upon? And hence the need for the usb to allow that data to be transmitted. Just a guess, though.
Does anyone know how I can add my program to the memory onboard my arduino so that my robot can run indepently from my computer?
That is how Arduino normally works. When powered up, it runs the program you last uploaded. If that program requires no input from you or your computer, there is nothing more to do but watch it in action.
My problem comes in when trying to get the Arduino to act as a standalone piece of hardware.
In light of my point above, please explain your problem.