I recently received a UArm Swift Pro at my place of employment. We are trying to use the UArm for a simple, repeatable task that runs after input from a sensor.
Can a program be uploaded and saved to the UArm and run without a USB or Blue Tooth connection to a computer? Can this be done by modifying the source code in one way or another?
Ideally, we’d be able to turn the UArm on and press one of the buttons on the base to start the program.
I’m somewhat familiar with programming, but I haven’t discovered the means to upload a program to the UArm Swift Pro. After looking at the Developer’s Guide, I’ve been successful in sending Gcode commands through the Arduino Serial Monitor.
I would buy an Arduino mega clone and use that to send the gcode direct to the uarm through the 2nd uart. Check out the developer guide on the download page
Thanks for the reply. Based on your suggestion, it’s then possible to upload a program to a second Arduino Mega that sends gcode to the uArm? i.e. The second mega has some serial output?
Hi yes, the mega has multiple serial pins, I’ve noticed that there is not much free memory on the mega in the uarm so this is definitely the best approach. You could also add leds, lcd or oled to the 2nd mega to give you a status update of the program in progress. If you added a ethernet or wifi shield to the 2nd mega you could control it remotely.
“Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and 16 (TX); Serial 3: 15 (RX) and 14 (TX). Used to receive (RX) and transmit (TX) TTL serial data. Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.”
Do you by chance have an example of Arduino IDE code that outputs Gcode from the serial port?
I’m having trouble finding the right code to accomplish this. I’ve found examples on this forum that explain how to use the Arduino to control the Uarm, but basically only by sending keyboard commands to the PC first, which then sends the commands to the Uarm through USB. I’d like to use the 2nd UART.
Here is an example you would basically write to the serial pins you’ve chosen on the mega and then wait for the response from the uarm. The serial speed should be 115200 not 9600. I would try M114 first to see what you get. Don’t forget to send an M2500 over usb to switch the ports over. (http://download.ufactory.cc/docs/en/uArm-Swift-Pro-Develper-Guide-171221.pdf)
I know how to connect the Arduino to the uArm and switch the ports, but I’m having trouble with the actual Arduino IDE code. I’m not sure how exactly to write Gcode commands in the Arduino code.
For example, I’m trying to get the uArm head to move to a particular position. I’m writing:
Serial.write(“G0 X200 Y0 Z130 F10000”)
But the uArm doesn’t move. Is this the wrong way to input Gcode commands from Arduino IDE?
Actually I just got it figured out. I was calling out the newline incorrectly in my previous code. Your last message prompted me to go back and take a look, and now it’s working just fine.