0

I'm trying to upload code from a Mac (online Arduino editor) onto an Arduino Mega2560, to connect a motor to pin 52 and Ground to get it to move. But at the top it says busy (like it does when it uploads) and doesn't do anything else. Refreshing the page doesn't work. The code is verified, and here's the code:

void setup() {
}

void loop() {
  digitalWrite(52,HIGH);
}

The Arduino application (with same code copied in) comes up with this error:

Arduino: 1.8.4 (Mac OS X), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)" Sketch uses 1190 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
avrdude: ser_open(): can't open device "COM1": No such file or directory
ioctl("TIOCMGET"): Inappropriate ioctl for device
ioctl("TIOCMGET"): Inappropriate ioctl for device
avrdude: ser_send(): write error: Bad file descriptor
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
the selected serial port avrdude: stk500v2_getsync(): timeout communicating with programmer does not exist or your board is not connected

I hope someone can work out why it doesn't upload!

  • What specific online Arduino editor? There are more than one. Also, the Arduino pin cannot supply enough power to drive a motor. – jose can u c Dec 23 '17 at 13:50
  • It's create.arduino.cc/editor. The motor works when I connect it to the power section GND and 5/3.3v pins. Because of the error codes, have I damaged the port? – Rocket1829 Dec 23 '17 at 13:53
  • 1
    The power pins are can supply much more energy than the IO pins. Your error text notes COM1, but Macs don’t call ports COM1. You need to set the port correctly to upload. But you won’t get the motor to work on a data pin anyway. – jose can u c Dec 23 '17 at 13:57
  • Ok I'm new to Arduino so that really helps thanks. But still why won't the code upload? – Rocket1829 Dec 23 '17 at 14:04
  • You have to figure out the right serial port. I’m not familiar enough with the online editor to help you on that. I just know COM1 is wrong on a Mac. – jose can u c Dec 23 '17 at 14:10
0

I would suggest to download the Arduino app (https://www.arduino.cc/en/Main/Software).

Download both the latest version and an a legacy build (https://www.arduino.cc/en/Main/OldSoftwareReleases#00xx). Within the DMG for the legacy you'll need to install the FTDI drivers to allow Arduino app to see the Arduino in ports.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.