Go Down

Topic: Error with arduino Uno? (Read 507 times) previous topic - next topic

singlepringle

if anyone can make sense of this, that would be great. On my project https://hackaday.io/project/16315-12-servo-hexapod, i'm 90% sure it's my mega that's screwing me over, so I had an idea and made a cheap shield for my name brand arduino (the mega is a clone). It can only control 6 servos, but I can still experiment with them fine. It's not that that's giving me problems either, because it still dosen't work without it. When I finally decided to upload the code, it flashed me this. The right port is showing up, i tried all the programmers, and I chose the right board:



Arduino: 1.8.5 (Mac OS X), Board: "Arduino/Genuino Uno"



/Users/svteacher/Downloads/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Users/svteacher/Downloads/Arduino.app/Contents/Java/hardware -hardware /Users/svteacher/Library/Arduino15/packages -tools /Users/svteacher/Downloads/Arduino.app/Contents/Java/tools-builder -tools /Users/svteacher/Downloads/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/svteacher/Library/Arduino15/packages -built-in-libraries /Users/svteacher/Downloads/Arduino.app/Contents/Java/libraries -libraries /Users/svteacher/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10805 -build-path /var/folders/_h/cw2_jv2j0kb8m4shtlxb48900000gq/T/arduino_build_154053 -warnings=none -build-cache /var/folders/_h/cw2_jv2j0kb8m4shtlxb48900000gq/T/arduino_cache_844144 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/svteacher/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.avrdude.path=/Users/svteacher/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=/Users/svteacher/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.1.1 -verbose /Users/svteacher/Documents/Arduino/hexapod_one_leg/hexapod_one_leg.ino
/Users/svteacher/Downloads/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Users/svteacher/Downloads/Arduino.app/Contents/Java/hardware -hardware /Users/svteacher/Library/Arduino15/packages -tools /Users/svteacher/Downloads/Arduino.app/Contents/Java/tools-builder -tools /Users/svteacher/Downloads/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/svteacher/Library/Arduino15/packages -built-in-libraries /Users/svteacher/Downloads/Arduino.app/Contents/Java/libraries -libraries /Users/svteacher/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10805 -build-path /var/folders/_h/cw2_jv2j0kb8m4shtlxb48900000gq/T/arduino_build_154053 -warnings=none -build-cache /var/folders/_h/cw2_jv2j0kb8m4shtlxb48900000gq/T/arduino_cache_844144 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/svteacher/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.avrdude.path=/Users/svteacher/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=/Users/svteacher/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.1.1 -verbose /Users/svteacher/Documents/Arduino/hexapod_one_leg/hexapod_one_leg.ino
Using board 'uno' from platform in folder: /Users/svteacher/Library/Arduino15/packages/arduino/hardware/avr/1.6.21
Using core 'arduino' from platform in folder: /Users/svteacher/Library/Arduino15/packages/arduino/hardware/avr/1.6.21
Detecting libraries used...
"/Users/svteacher/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/Users/svteacher/Library/Arduino15/packages/arduino/hardware/avr/1.6.21/cores/arduino" "-I/Users/svteacher/Library/Arduino15/packages/arduino/hardware/avr/1.6.21/variants/standard" "/var/folders/_h/cw2_jv2j0kb8m4shtlxb48900000gq/T/arduino_build_154053/sketch/hexapod_one_leg.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/Users/svteacher/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/Users/svteacher/Library/Arduino15/packages/arduino/hardware/avr/1.6.21/cores/arduino" "-I/Users/svteacher/Library/Arduino15/packages/arduino/hardware/avr/1.6.21/variants/standard" "/var/folders/_h/cw2_jv2j0kb8m4shtlxb48900000gq/T/arduino_build_154053/sketch/hexapod_one_leg.ino.cpp" -o "/var/folders/_h/cw2_jv2j0kb8m4shtlxb48900000gq/T/arduino_build_154053/preproc/ctags_target_for_gcc_minus_e.cpp"
fork/exec /Users/svteacher/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++: no such file or directory
Error compiling for board Arduino/Genuino Uno.



Oh man, I don't even know where to start. :p

I don't think it will help, mainly because i haven't been able to test it (see above XD), but here's the code:

Code: [Select]
#include <Servo>

Servo topservo;

Servo bottomservo;



void setup() {
topservo.attach(8);
bottomservo.attach(9);
}



void loop() {
bottomservo.write(0);
topservo.write(50);
delay(1000);
topservo.write(0);
bottomservo.write(110);
delay(1000);
}

UKHeliBob

You could start by using the #include properly
Instead of
Code: [Select]
#include <Servo>
it should be
Code: [Select]
#include <Servo.h>

That is not the cause of most of the errors but fix what you can first
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

singlepringle

yeah, thatÅ› what i had, but the .h wasn't orange, so I deleted it and went to "include library" and selected the servo library, and that's what came up

UKHeliBob

Ignore the colours.  They are a waste of time

Quote
so I deleted it and went to "include library" and selected the servo library, and that's what came up
Really ?

Have you rebooted the PC since you tried that and tried again ?  It may be a symptom of a corrupted Arduino environment installation.



Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

sterretje

This is what to start with ;)
Quote
fork/exec /Users/svteacher/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++: no such file or directory
Re-install might indeed be in place.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

singlepringle

yeah, tried that, but i will again

sterretje

Make sure that you clean up everything. Not familiar with the Mac, but search for a directory called Arduino15 and delete that as well; on a windows system it's C:\Users\yourUserName\AppData\Local\Arduino15.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

TomGeorge

Hi,
Your code with Servo.h    in the include compiled for Mega

Code: [Select]

#include <Servo.h>

Servo topservo;

Servo bottomservo;



void setup() {
topservo.attach(8);
bottomservo.attach(9);
}



void loop() {
bottomservo.write(0);
topservo.write(50);
delay(1000);
topservo.write(0);
bottomservo.write(110);
delay(1000);
}


Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up