text:
Home-made Arduino not receiving data
Me and my friend recently built a Breadboard Arduino. It switches on fine, and the LED changes a bit. I have added a 5V FTDI cable, but it wouldn't upload, trying to fix this, I used my friends 5V FTDI Basic USB-To-Serial converter chip, thinking this would upload fine, as it was new, but it still wouldn't upload, giving the very long error:
Arduino: 1.5.8 (Windows XP), Board: "Arduino Duemilanove or Diecimila, ATmega328"

Build options changed, rebuilding all

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\sketch_jan31a.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\sketch_jan31a.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\hooks.c -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\hooks.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\WInterrupts.c -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\WInterrupts.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\wiring.c -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\wiring_analog.c -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring_analog.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\wiring_digital.c -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring_digital.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.c -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring_pulse.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\wiring_shift.c -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring_shift.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\abi.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\abi.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\CDC.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\CDC.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial0.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial0.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial1.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial1.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial2.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial2.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial3.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial3.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\HID.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HID.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\IPAddress.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\IPAddress.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\main.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\main.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\new.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\new.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\Print.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\Print.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\Stream.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\Stream.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\Tone.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\Tone.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\USBCore.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\USBCore.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\WMath.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\WMath.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\WString.cpp -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\WString.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\hooks.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\WInterrupts.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring_analog.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring_digital.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring_pulse.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\wiring_shift.c.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\abi.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\CDC.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial0.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial1.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial2.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HardwareSerial3.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\HID.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\IPAddress.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\main.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\new.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\Print.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\Stream.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\Tone.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\USBCore.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\WMath.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\WString.cpp.o

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections -mmcu=atmega328p -o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/sketch_jan31a.cpp.elf C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp\sketch_jan31a.cpp.o C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/core.a -LC:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp -lm

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/sketch_jan31a.cpp.elf C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/sketch_jan31a.cpp.eep

C:\Program Files\Arduino/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/sketch_jan31a.cpp.elf C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/sketch_jan31a.cpp.hex

Sketch uses 450 bytes (1%) of program storage space. Maximum is 30,720 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.

C:\Program Files\Arduino/hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -PCOM8 -b57600 -D -Uflash:w:C:\DOCUME~1\George\LOCALS~1\Temp\build7021919583125132986.tmp/sketch_jan31a.cpp.hex:i

avrdude: Version 6.0.1, compiled on Apr  3 2014 at 23:12:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x01

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

The light on the USB-To-Serial board lights once for each failed upload, but the sketch won't upload. I am trying to upload the blink sketch. The chip I am using is an Atmel AtMega328P-PU. All answers greatly appreciated.

Did you burn the bootloader onto your AtMega328?

No, I bought an AtMega328P with the bootloader preloaded.

Is this correct   Overriding Baud Rate          : 57600 (may be). AVRdude correct?

How did you connect the DTR pin? It might be that you have to manually reset the arduino before uploading.

@RussellMcMahon - Checked the output (I have verbose enabled). Overriding baud rate is 57600.

@Gerben - The DTR Pin is connected to reset button on breadboard.

DTR should be connected via a small capacitor, not directly.

@Gerben - Connected DTR with small capacitor. The capacitor is 0.10uf, and links over the IC notch in the breadboard, but I still can't upload. I've also tried a different FTDI cable, but I still get the same result.

Does the led stop changing when uploading? Does manually resetting the AVR work?

Is your bootloader configured for an external crystal?  If so, are you providing one of the appropriate frequency with loading capacitors?  What baud rate does your bootloader expect?

Hold the reset button (or just keep it from booting) and then a tiny bit before the arduino IDE tells "Uploading..." release the button. Then the bootloader should be able to get the serial data and flash the new software. (If the Arduino is not in bootloader (1-2sec after releasing the reset button) you can't program it)

I would upload a blink sketch using the method Stephan suggested then plug it back into your breadboard.  If it runs the blink sketch then the problem is in your programming method, but  it is more likely there is something wrong in the setup.  Problems could be using the wrong crystal for your setup, mis-wired or loose connection, or having your chip turned around (happens more often than you think).  If it does run I would make sure that you are using all USB-to-Serial converter with all the wires used and having a resister on the reset pin.

I solved this by using an empty Uno-Board as a 'bridge' between the PC and the Bareduino (empty means with no controller chip). Just connect this guy via USB to the PC and then connect RX/TX, Ground, and Reset to your Bareduino. Just works fine for me.

How would this be superior to what the poster is doing (which has worked for many, including myself)?

Well - didn't he post because it is not working? It didn't work for me either and i am using my proposed solution since quite some time. Another advantage is - it is minimal invasive for the breaduino as only 3 cables have to be connected.

Four.  The same four you need with anything else.  Five if you get power from USB.

The likely causes of failure are

Wrong baud rate: you're already using 57600, the most common one.
Rx and Tx cross connected: try connecting them the other way round.
Wrong clock clock frequency in the chip: The tools usually assume an AtMega328 runs at 16MHz.
Chip is not in bootloader/programming state, in the very first seconds after releasing the reset button or powering the arduino, the bootloader is listening for instructions to start reprogramming the chip via serial communication, if there is none it will continue running the program on it. Hold reset -> Hold upload -> Release upload -> Release reset.

The above assumes, of course, that you have a working board. If that isn't certain, follow @Nathan's advice to plug in a chip pre-programmed with a Blinky sketch to confirm it. I use a combined Blinky and HelloWorld sketch to prove both the basic functioning and the serial I/O in one test.
A couple of these are handy to keep around, too, for proving there is power or a logic HIGH where you expect it:

       LED with current-limiting resistor on the cathode


text:
How do I write a debugger for Arduino?
I want to write my own debugger.
I've found Visual Micro plugin for Visual Studio provides Arduino Debug.
So, does anyone have ideas how it works?
I just desire make the same plugin in Eclipse IDE.

Paying them $49 for their debugger would be the easy path. They insert "breakpoints in the code and output debug information to a serial monitor. "Invisible" breakpoints can be inserted by replacing code at the target location with a "break" function and then running or simulating the desired code that has been removed for user inspection.

It works by inserting hidden code for breakpoints (decided before the actual run) that uses the serial port to communicate (and block) with the host system (Visual Micro). Changing watched variables and changing the breakpoints requires recompilation and reupload to the Arduino (thus restart of the application running on the Arduino).

Assuming you have enough time and money to spend on this project. ($50 is a bargain for a debugger, believe me. About a decade ago I wrote an assembler/debugger suite for a very small niche market microcontroller, the Maxim Integrated MAX1464, using a combination of SciTe and Perl/Tk. Writing your own debugger is a great educational project, if you have the time and money to complete it.)
Tools
Assuming you already have all the standard Arduino debug tools, and just want to learn the process of making a debug tool.
Assuming you've used the standard Arduino debug tools before, and written enough programs (sorry, you Arduino guys call them "sketches" for some reason) so that you have some code you feel comfortable debugging on. Setting a breakpoint in a simple "blinking LED" program isn't very satisfying, better to set breakpoints in a test program that actually does something. You'll also want to have some branching logic pathways to test breakpoints, and some variables (counters perhaps) so you can test reading values through the debug interface.
Assuming you have a couple of spare Arduino boards, because very likely during development some bad debug commands may get sent. Ideally you should have a device programmer capable of restoring the Arduino bootloader image that normally resides in the Atmel AVR processor. Sending arbitrary commands to the debug interface could possibly erase or mess up the bootloader.
Assuming you have access to customary EE lab tools: DMM, oscilloscope, soldering iron, etc.
Research
Assuming you already know how to make an Eclipse IDE plugin... (if you don't, that would be a question to research on Google or StackOverflow.) I'm treating this the same as if you were writing a plain command-line debugger or a gdb driver.
I'm not really sure which debug protocol you need to implement. Sadly, JTAG doesn't seem to be supported by Arduino. The ICSP in-circuit system programming header might give debug access, though it would require attaching some hardware to the board that you're debugging. If I understand correctly, the Arduino IDE supports debugging through the USB port, which is a very attractive setup.
Assuming you plan to use Atmel's proprietary DebugWIRE protocol, which someone else has kindly attempted to reverse-engineer here: http://www.ruemohr.org/docs/debugwire.html  Ideally you'd get the real documentation from Atmel. The hazard of a reverse-engineered protocol like this (aside from possible IP infringement) is that the protocol could change without notice. Not having direct access to the team that designed the microcontroller, means you have to rely on whatever documentation you can find and whatever else you can discover experimentally.
Assuming you can use the USB bridge chip's DTR# to drive (and possibly sense) the RESET pin, to access DebugWire. If that USB bridge chip is an FTDIchip.com device, you'll want to use the bit-banging mode to drive and sense DTR#. (In normal "RS232 mode" this pin is not bidirectional.) Go to the FTDIchip.com website to get the D2XX programmer's guide and example code.
Since DebugWire is a protocol that uses one wire for all signalling, both directions, timing is absolutely critical. You must use an oscilloscope to observe the DebugWire signals on the RESET pin, otherwise you're "flying blind".
That should be enough to get you started. Initially, you'll have to figure out how to discover an attached Arduino, enter debug mode, set a breakpoint, and reset the part back into free-running mode. The "blinking LED" test program is good enough to see some results for this early stage.
Cheers

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
How to know which Arduino to choose: Nano, Micro or Pro Micro?
I'm puzzled at the moment with which one to choose.

Form-factor plays a significant role in my project, so I prefer the smaller boards mentioned in the title to fuller boards like the UNO, MEGA, etc.
I have an RC522 RFID read/write module and would like to use it without having to deal with level switching, as the RFID module requires 3.3V.

What can you advise?
Thank you in advance!

I'm currently using inexpensive Arduino Nano boards running GRBL for a couple of little CNC machines.  The version I have uses an ATmega328 running at 5V and they work very well.
They may be available with 3.3V regulator instead of 5V - I don't know and I preferred to have 5V anyway.
The nano boards that I have look to be a complete Arduino: one side of the board has the ATmega and voltage regulator, the other side of the board has the USB interface chip and some LEDs.
You can purchase Chinese-made nano boards very inexpensively.  Look on eBay for sellers offering free International shipping.

I have used the ProMicro and the nano for a few projects and they are both great boards.  I had a little bit of trouble getting the Pro Micro up and running but SparkFun has a great tutorial that should give you plenty of information to get that board up and running. If it's between those three boards, I would suggest the Pro Micro.
You could also consider the Pro Mini (https://www.sparkfun.com/products/11114).  You will need an FTDI programmer for it (https://www.sparkfun.com/products/9873) but don't be discouraged by that.  It's really straightforward to use.  The cost is about the same as the Pro Micro and there are no special drivers required to get your computer talking to the Pro Micro.  The Pro Mini with the FTDI basic "just works".  One disadvantage to the Pro Micro is that you won't be able to power it over USB unless you leave the FTDI attached to it...but like most Arduinos you can just power it over a pin with a wide range of voltages.
Really any of the boards you mentioned will do the job.
Another board that's even smaller than the ones you mentioned would be the trinket or pro trinket by Adafruit.  Similar to the pro micro, you need some additional drivers but Adafruit is really good about providing tutorials.
If you don't want to worry about external programmers and additional drivers and you want to power over usb get the Micro.  If you are powering off of a battery and need to wire it up anyway and are willing to do a little bit of configuration on your computer consider the Pro Micro or the trinket.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Servo Buzz / millis()
I am having a problem with Servo Buzz that I have ascertained is from the millis() function using too much time for Arduino to generate a steady pulse for the servos.
I looked at this thread but was unable to figure out a solution from the code (I'm a novice)
Stack Exchange Servo Buzz
I am including my code even though it is very large, the only time I need to servos to run smoothly is in case 4 of my switch/case.
#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
#include <Adafruit_MotorShield.h> //LIBRARY FOR MOTOR DRIVER SHIELD
#include "utility/Adafruit_PWMServoDriver.h"
#include <Servo.h> //LIBRARY FOR SERVOS

Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61);
Adafruit_StepperMotor *myStepper = AFMS.getStepper(200, 2);
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#define WHITE 0x7

Servo pan;
Servo tilt;//DECLARE SERVOS
int yy = 0; //STEP COUNTER
//declares ints
uint8_t i=0; //BUTTON INPUTS
int x = 1; //case statement movement
int input_stage = 0;
int time = millis(); //time from when the thing turned on

//user inputs
int total_hour = 0;
int total_minute = 0;
int slide_min = 0;
int slide_max = 0;
int pan_min = 800 ;
int pan_max = 2200;
int tilt_min = 800;
int tilt_max = 2200;

//Integers used for calculations for later
int total_steps = yy;
long total_time = 0;
long step_duration = 0;
int total_pan = 0;
int total_tilt = 0;
long pan_duration = 0;
long tilt_duration = 0;
long step_millis = 0;
long pan_millis = 0;
long tilt_millis = 0;
int step_percent = 0;

// Integers for real time program sliding action
int cur_step = 0;
int pan_pos = 0;
int tilt_pos = 0;
long run_dur = 0;
long start_time = 0;
int total_slide = 0;
long display_refresh = millis();
long display_dur = 1000;
int d = 1;
long end_time = millis();
int m = 0;

void setup(){
  lcd.begin(16, 2);
  lcd.setBacklight(WHITE);
  lcd.print("Welcome to LapsR");//initialize
  delay(2000);

  AFMS.begin();  //initialize motor shield
  pan.attach(10); //attach servos to pins
  tilt.attach(9);

  myStepper->setSpeed(30); // set speed

  lcd.setCursor(0, 0);
  lcd.print("By Doug E FresH!");
  delay(2500);
  lcd.setCursor(0, 1);
  lcd.print("Thanks to: Dave");
  delay(2000);
  lcd.setCursor(0, 1);
  lcd.print("Thanks to:  Max");
  delay(2000);
  pan.writeMicroseconds(1500); //set pan and tilt servos to centre ish
  tilt.writeMicroseconds(1500);
  delay(5000);
  pan.writeMicroseconds(1000); //Jitter Test
  tilt.writeMicroseconds(1000);
  delay(5000);
  pan.writeMicroseconds(2000); //Jitter Test
  tilt.writeMicroseconds(2000);
  delay(5000);
}

void loop(){
  uint8_t buttons = lcd.readButtons();  //read lcd buttons
  lcd.blink(); //set cursor to blink
  int limit1 = 4;  //declare limit switch
  pinMode(limit1, INPUT_PULLUP);  // sets pin mode to button

  //begin case statement
  switch(x){
  case 1:

   if(m==0){ //move slider backwards until it finds a limit switch
    if((digitalRead(limit1) == HIGH)){ // digital read reads the limit switch pin - HIGH means the switch is open
      myStepper->step(2,BACKWARD,DOUBLE);
      lcd.clear();
      lcd.print("stage 1");
      delay(10);
    }
    else{ //move to the next step
      myStepper->release(); //release motor
      m = 1; //set program to 2nd stage
    }
  }
  if(m==1){ // moving ahead jus a bit so there is some pad for innacuracy
    yy = 50; //step counter is initialized
    lcd.clear();
    lcd.print("stage 2");
    delay(1000);
    myStepper->step(50,FORWARD,SINGLE); //move forward 50 steps
    m = 2;//move to the next step
  }
  if(m==2){ //stage 3 dawg
    if((digitalRead(limit1) == HIGH)){//count steps til limit is hit
      myStepper->step(1,FORWARD,SINGLE);//move forward 1 step
      lcd.clear();
      lcd.print("stage 3");
      yy++; //step counter move up one
      delay(10);
    }
    else{  //display step percentage and total steps
      x=2;
      lcd.clear();
      lcd.print("step %");lcd.print((yy-100)/100);
      delay(5000);
      lcd.clear();
      lcd.print("total: ");lcd.print(yy-100);
      delay(5000);

      myStepper->step((yy - 50),BACKWARD,SINGLE); // reset to start position (minus 50 steps for pad)
      myStepper->release(); // release motor
      step_percent = (yy-100)/100; //make calculations
      total_steps = yy-100;
    }
  }

break;

  case 2:

    if(input_stage == 0){ //enter duration
      if(d==1){
        lcd.clear();
        lcd.print("Total Duration?");//start asking for inputs - start with total overall duration hours
        lcd.setCursor(0, 1);
        lcd.print("H: ");
        lcd.print(total_hour);
        lcd.print("  M: ");
        lcd.print(total_minute);
        lcd.setCursor(3,1);
        display_refresh = millis();
        d = 0;
      }
      if (buttons & BUTTON_UP) {  //sets hour up - slight debounce delay
        total_hour = total_hour++;
        delay(250);
        d=1;
      }
      if (buttons & BUTTON_DOWN) { //sets hour down
        total_hour = total_hour--;
        delay(250);
        d = 1;
      }
      if (buttons & BUTTON_SELECT){
        input_stage++;delay(250); //select button moves to next stage
        lcd.clear();
        d=1;
      }
    }
    if(input_stage == 1){
      uint8_t buttons = lcd.readButtons();
      if(d==1){  //when d == 1 update display
        lcd.clear();
        lcd.print("Total Duration?");//ask for minutes
        lcd.setCursor(0, 1);
        lcd.print("H: ");
        lcd.print(total_hour);
        lcd.print("  M: ");
        lcd.print(total_minute);
        lcd.setCursor(9,1);
        d=0;
      }
      if (buttons & BUTTON_UP) {
        total_minute = total_minute++;  //set minutes
        delay(100);
        d=1;
      }
      if (buttons & BUTTON_DOWN) {
        total_minute = total_minute--; //set minutes
        d=1;
        delay(100);
      }
     if (buttons & BUTTON_SELECT){
       input_stage++; // select moves to next stage
       delay(250);
       lcd.clear();
       d=1;
     }
     if (buttons & BUTTON_LEFT){
       input_stage--; //back moves to previous stage
       delay(250);
       d=1;
     }
   }
   if(input_stage == 2){
     uint8_t buttons = lcd.readButtons();
     if(d==1){
       lcd.clear();
       lcd.print("Slide%start-fin");//ask for minimum slide percentage
       lcd.setCursor(0, 1);
       lcd.print("S: ");
       lcd.print(slide_min);
       lcd.print("  F: ");
       lcd.print(slide_max);
       lcd.setCursor(3,1);
       d=0;
     }
     if (buttons & BUTTON_UP && slide_min < 100) {
       slide_min = slide_min++; // select start position in percentgae
       d=1;
       delay(100);
       myStepper->step(step_percent, FORWARD, DOUBLE); //move forward one percent - allows user to preview positions
     }
     if (buttons & BUTTON_DOWN && slide_min > 1) { // do not allow motor to move below 0 percent
       slide_min = slide_min--;
       myStepper->step(step_percent, BACKWARD, DOUBLE);//move forward one percent - allows user to preview positions
       d=1;
       delay(100);
     }
     if (buttons & BUTTON_SELECT){ //moves to next stage
       input_stage++;
       delay(250);
       lcd.clear();
       slide_max = slide_min; //sets ending position to set min position
       d=1;
     }
     if (buttons & BUTTON_LEFT){
       input_stage--;delay(250); // previous stage
       d=1;
     }
   }
   if(input_stage == 3){
     uint8_t buttons = lcd.readButtons();
     if(d==1){
       lcd.clear();
       lcd.print("Slide%start-fin");//ask for max slide percentage
       lcd.setCursor(0, 1);
       lcd.print("S: ");
       lcd.print(slide_min);
       lcd.print("  F: ");
       lcd.print(slide_max);
       lcd.setCursor(9,1);
       d=0;
     }
     if (buttons & BUTTON_UP && slide_max < 100) {
       slide_max = slide_max++;
       d=1;delay(100);
       myStepper->step(step_percent, FORWARD, DOUBLE);  //shows set stepper position
     }
     if (buttons & BUTTON_DOWN  && slide_max > 1) {
       slide_max = slide_max--;
       myStepper->step(step_percent, BACKWARD, DOUBLE);
       d=1;
       delay(100);
     }
     if (buttons & BUTTON_SELECT){ //moves to next stage
       input_stage++;
       delay(250);
       lcd.clear();
       myStepper->step((step_percent*slide_max), BACKWARD, DOUBLE); //sets platform back to home position
       d=1;
       myStepper->release();
     }
     if (buttons & BUTTON_LEFT){
       input_stage--; //moves to previous stage
       delay(250);
       d=1;
     }
   }
   if(input_stage == 4){
     uint8_t buttons = lcd.readButtons();
     if(d==1){
       lcd.clear();
       lcd.print("Pan start-fin");//ask for min pan
       lcd.setCursor(0, 1);
       lcd.print("S: ");
       lcd.print(pan_min);
       lcd.print("  F: ");
       lcd.print(pan_max);
       lcd.setCursor(3,1);
       d=0;
     }
     if (buttons & BUTTON_UP) {
       pan_min = pan_min + 10;  //sets displays pan parameters
       pan.writeMicroseconds(pan_min);
       d=1;
       delay(10);
     }
     if (buttons & BUTTON_DOWN) {
       pan_min = pan_min - 10;
       d=1;
       delay(10);
       pan.writeMicroseconds(pan_min);
     }
     if (buttons & BUTTON_SELECT){
       input_stage++;
       delay(50);
       lcd.clear();
       pan_max=pan_min; //sets max to min to not cause a brownout
       d=1;
     }
     if (buttons & BUTTON_LEFT){
       input_stage--;
       delay(50);
       d=1;
     }
   }
   if(input_stage == 5){
     uint8_t buttons = lcd.readButtons();
     if(d==1){
       lcd.clear();
       lcd.print("Pan start-fin");//ask for max pan
       lcd.setCursor(0, 1);
       lcd.print("S: ");
       lcd.print(pan_min);
       lcd.print("  F: ");
       lcd.print(pan_max);
       lcd.setCursor(9,1);
       d=0;
     }
     if (buttons & BUTTON_UP) {
       pan_max = pan_max + 10;
       d=1;
       delay(10);
       pan.writeMicroseconds(pan_max);
     }
     if (buttons & BUTTON_DOWN) {
       pan_max = pan_max - 10;
       pan.writeMicroseconds(pan_max);
       d=1;
       delay(10);
     }
     if (buttons & BUTTON_SELECT){
       input_stage++;
       delay(250);
       lcd.clear();
       d=1;
     }
     if (buttons & BUTTON_LEFT){
       input_stage--;
       delay(250);
       d=1;
     }
   }
   if(input_stage == 6){
     uint8_t buttons = lcd.readButtons();
     if(d==1){
       lcd.clear();
       lcd.print("tilt start-fin");//ask for min tilt
       lcd.setCursor(0, 1);
       lcd.print("S: ");
       lcd.print(tilt_min);
       lcd.print("  F: ");
       lcd.print(tilt_max);
       lcd.setCursor(3,1);
       d=0;
     }
     if (buttons & BUTTON_UP) {
       tilt_min = tilt_min + 10;
       d=1;
       delay(10);
       tilt.writeMicroseconds(tilt_min);
     }
     if (buttons & BUTTON_DOWN) {
       tilt_min = tilt_min - 10;
       tilt.writeMicroseconds(tilt_min);
       d=1;
       delay(10);
     }
     if (buttons & BUTTON_SELECT){
       input_stage++;
       delay(250);
       tilt_max=tilt_min;
       lcd.clear();
       d=1;
     }
     if (buttons & BUTTON_LEFT){
       input_stage--;
       delay(250);
       d=1;
     }
   }
   if(input_stage == 7){
     uint8_t buttons = lcd.readButtons();
     if(d==1){
       lcd.print("tilt start-fin");//ask for max tilt
       lcd.setCursor(0, 1);
       lcd.print("S: ");
       lcd.print(tilt_min);
       lcd.print("  F: ");
       lcd.print(tilt_max);
       lcd.setCursor(9,1);
       d=0;
     }
     if (buttons & BUTTON_UP) {
       tilt_max = tilt_max + 10;
       tilt.writeMicroseconds(tilt_max);
       d=1;
       delay(10);
     }
     if (buttons & BUTTON_DOWN) {
       tilt_max = tilt_max - 10;
       delay(10);
       tilt.writeMicroseconds(tilt_max);
       d=1;
      }
      if (buttons & BUTTON_SELECT){
        input_stage++;delay(250);
      }
      if (buttons & BUTTON_LEFT){
        input_stage--;delay(250);
      }
    }
    if(input_stage == 8){   //confirm parameters
      lcd.noBlink();
      uint8_t buttons = lcd.readButtons();
      lcd.clear();
      lcd.print("SL: ");
      lcd.print(slide_min);
      lcd.print(" - ");
      lcd.print(slide_max);
      lcd.setCursor(0,1);
      lcd.print("PN: ");
      lcd.print(pan_min);
      lcd.print(" - ");
      lcd.print(pan_max);
      delay(2500);
      lcd.clear();
      lcd.print("TI: ");
      lcd.print(tilt_min);
      lcd.print(" - ");
      lcd.print(tilt_max);
      lcd.setCursor(0,1);
      lcd.print("Dur: ");
      lcd.print(total_hour);
      lcd.print(":");
      lcd.print(total_minute);
      delay(2500);
      lcd.clear();
      lcd.print("Left for back");
      lcd.setCursor(0,1);
      lcd.print("Select to go");
      delay(2500);
      if (buttons & BUTTON_SELECT){
        x = 3; //if user is happy with set parametres - continue to run move program
      }
      if (buttons & BUTTON_LEFT){
        input_stage--;delay(50); // if user made a mistake they can press left to go back
      }
    }

break;

    case 3:

    //calculate moving time durations
    total_time = total_hour*60;
    total_time = total_time + total_minute;
    total_time = total_time*60000;
    total_slide = slide_max - slide_min;
    step_duration = total_time/(total_slide*step_percent);
    total_pan = pan_max - pan_min;
    total_tilt = tilt_max - tilt_min;
    pan_duration = total_time/total_pan;
    tilt_duration = total_time/total_tilt;

    //display values for debuging
    lcd.clear();
    lcd.print("total time");
    lcd.setCursor(0,1);
    lcd.print(total_time);
    delay(5000);
    lcd.clear();
    lcd.print("total slide");
    lcd.setCursor(0,1);
    lcd.print(total_slide);
    delay(5000);
    lcd.clear();
    lcd.print("step duration");
    lcd.setCursor(0,1);
    lcd.print(step_duration);
    delay(5000);
    lcd.clear();
    lcd.print("total pan");
    lcd.setCursor(0,1);
    lcd.print(total_pan);
    delay(5000);
    lcd.clear();
    lcd.print("total tilt");
    lcd.setCursor(0,1);
    lcd.print(total_tilt);
    delay(5000);
    lcd.clear();
    lcd.print("pan duration");
    lcd.setCursor(0,1);
    lcd.print(pan_duration);
    delay(5000);
    lcd.clear();
    lcd.print("tilt duration");
    lcd.setCursor(0,1);
    lcd.print(tilt_duration);
    delay(5000);
    step_millis = millis();
    pan_millis = millis();
    tilt_millis = millis();
    pan_pos = pan_min;
    pan.write(pan_pos);
    tilt_pos = tilt_min;
    tilt.write(tilt_min);

    //sets pedestal to user input slide min position
    myStepper->step((step_percent*slide_min), FORWARD, DOUBLE);
    x = 4;
    start_time = millis();
    end_time = millis() + total_time;

break;

    case 4:
    long remaining = end_time - millis(); //make a couple of run time calculations
    run_dur = millis() - start_time;

    if(millis() - step_millis > step_duration){ //take one step after step duration
      myStepper->step(1, FORWARD, SINGLE);
      cur_step++;
      step_millis = millis();  //resets step duration
      myStepper->release();
    }
    if(millis() - pan_millis > pan_duration){ //same as slide
      pan_pos++;
      pan.writeMicroseconds(pan_pos);
      pan_millis = millis();
    }
    if(millis() - tilt_millis > tilt_duration){//same as slide
      tilt_pos++;
      tilt.writeMicroseconds(tilt_pos);
      tilt_millis = millis();
    }
   if(run_dur > total_time){   //resets to top of user input once total duration runs out
     x = 0;
     input_stage = 0;
     myStepper->step(cur_step, BACKWARD, DOUBLE); //sets motor back to home position
     myStepper->release(); //release motor
    }
  }
}

The thread says the underlying implementation of millis is to blame, not the actual use of the millis function. Even if you never call millis, the interrupt, that is used to count the milliseconds in the background, is still running.

You're calling millis() a lot in case 4. A very simple improvement would be to call it once at the start of loop(), storing the result in a variable. Throughout the rest of the function, simply use the value stored in that variable instead of calling millis() directly.
I doubt it will solve the problem entirely, but hopefully it will improve it a little.

It will also eliminate the probable bug of times not matching because millis() has rolled over during the execution.


text:
Arduino Ethernet and Uno R3 as a firewall
Is there a way to program the Ethernet Shield and Uno R3 to act as a firewall without using a huge chunk of the allowed bytes on the R3?  I plan on using a DC adapter to plug the R3 into a wall, and use the mini-SD card to keep logs while having the ethernet shield plugged into my router.
I know that it is possible to program it to do this but I want to know if there is a simple modification I can make to the web-client library or if I should use the web-server library and modify that?

You're going to be very, very, very unhappy if you use an Uno as a firewall. It simply isn't powerful enough.

Not to mention that after adding the Ethernet shield, it costs more than things which are powerful enough.

it is mostly an experiment, as I have other firewalls in place....

Statefull packet inspection would probably require more memory than the atmega has. I'd suggest looking into reflashing some router with OpenWRT. That was a great learning experience for me.

As an entry level board, I wouldn't suggest trying this on the R3. You can do it to an extent on the Yun which comes with both a network port and wifi.
Now that said, your internet speed will be severely hampered by the lack of resources on the yun. In which case, you might want to steer closer to the Intel Edison, which you can use with the arduino IDE. It is considerably more powerful.

Either one will still cost 2-3x what a platform designed for this purpose does.  If you want the challenge of do-it-yourself you can take your typical router, strip open/dd-wrt down to a bare embedded linux pre-ported to the hardware, and rebuild the routing/filtering configuration atop that from scratch.  Generally speaking, you want a board with two network interfaces for a firewall, as otherwise you are relying on the wan adapter and clients to behave by talking through you and not simply bypass you as they potentially could in a single-interface case (if misconfigured/compromised).


text:
use shiftIn and shiftOut with attiny85
I want my Attiny85 to communicate with another attiny85.
one attiny should send a message to my other attiny. When he receives the correct message he should turn one led on. Just a very simple test scatch.
I don't know why but the led never turns on.
Here is my code:
1st attiny85:
int clk_pin = 4,
    data_pin = 3,
    led = 0;

void setup() {
  pinMode(clk_pin, INPUT);
  pinMode(data_pin, INPUT);
  pinMode(led, OUTPUT);
}

void loop() {
  byte incoming = shiftIn(data_pin, clk_pin, LSBFIRST);

  if (incoming == 2)
  {
    digitalWrite(led, HIGH);
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
  }
}

2nd attiny:
int clk_pin = 0,
    data_pin = 1;

void setup(){
  pinMode(clk_pin, OUTPUT);
  pinMode(data_pin, OUTPUT);
}

void loop(){
  byte test = 2;
  shiftOut(data_pin, clk_pin, LSBFIRST, test);

  delay(5000);
}

I think there might be something wrong with my shiftIn/shiftOut command. It's actually the first time I'm using this.
Thanks for helping!

shiftIn() and shiftOut() are designed for communicating with different types of shift registers. These are typically external components which don't run code themselves, such as the 74HC595.
You can't use shiftIn() to read data that's been written using shiftOut(). The reason is that both functions try to act as the host in the communication -- i.e. the one that controls the clock line.
When you call shiftIn(), the clock line is pulsed each time it's ready to read a bit (i.e. it tells the shift register when to write). When you call shiftOut(), the clock line is pulsed each time it writes a bit (i.e. it tells the shift register when to read).
Neither one will respond to a clock line provided externally. The result is that your ATTiny's aren't synchronised so they won't be reading/writing at the same time.
A much simpler approach would be to setup a conventional serial connection between the two microcontrollers. You could do that either using software or hardware serial. The only caveat is that the sender would need to ensure the receiver is up-and-running before it transmits anything. This could be done using some kind of handshake at startup -- one device repeatedly sends something until the other replies.


text:
Arduino Based Home Automation System
I am working on my project of home automation system using Arduino GSM SIM900 & four channel relay module. I am facing a problem in my code. Can any one help me on this, SMS is receiving but its not switching the relays?
#include <SoftwareSerial.h>

// EN: String buffer for the GPRS shield message
String msg = String("");
// EN: Set to 1 when the next GPRS shield message will contains the SMS message
int SmsContentFlag = 0;
//control pins of relay.
int relay_a=4;
int relay_b=5;
int relay_c=6;
int relay_d=7;

// EN: Code PIN of the SIM card (if applied)
//String SIM_PIN_CODE = String( "XXXX" );

void setup()
{
  Serial.begin(19200);                 // the GPRS baud rate
  // Initialize  PINs
  pinMode( 4, OUTPUT );
  pinMode( 5, OUTPUT );
  pinMode( 6, OUTPUT );
  pinMode( 7, OUTPUT );
  digitalWrite( 4, LOW );
  digitalWrite( 5, LOW );
  digitalWrite( 6, LOW );
  digitalWrite( 7, LOW );
 Serial.println( "AT+CMGF=1" );
 delay(200);
}

void loop()
{
    char SerialInByte;
    if(Serial.available())
    {
        SerialInByte = (unsigned char)Serial.read();
       delay(5);

        // -------------------------------------------------------------------
        // EN: Program also listen to the GPRS shield message.
        // -------------------------------------------------------------------
       // EN: If the message ends with <CR> then process the message
        if( SerialInByte == 13 ){
          // EN: Store the char into the message buffer
          ProcessGprsMsg();
         }
         if( SerialInByte == 10 ){
            // EN: Skip Line feed
         }
         else {
           // EN: store the current character in the message string buffer
           msg += String(SerialInByte);
         }
     }
}
// EN: Make action based on the content of the SMS.
//     Notice than SMS content is the result of the processing of several GPRS shield messages.
void ProcessSms( String sms ){

  if( sms.indexOf("ona") >= 0 ){
    digitalWrite( relay_a, HIGH );
  }
   if( sms.indexOf("onb") >= 0 ){
    digitalWrite(  relay_b, HIGH );
  }
   if( sms.indexOf("onc") >= 0 ){
    digitalWrite(  relay_c, HIGH );
  }
  if( sms.indexOf("ond") >= 0 ){
    digitalWrite(  relay_d, HIGH );
  }
  if( sms.indexOf("offa") >= 0 ){
    digitalWrite(  relay_a, LOW );
  }
  if( sms.indexOf("offb") >= 0 ){
    digitalWrite(  relay_b, LOW );
  }
  if( sms.indexOf("offc") >= 0 ){
    digitalWrite(  relay_c, LOW );
  }
  if( sms.indexOf("offd") >= 0 ){
    digitalWrite(  relay_d, LOW );
  }
}
// EN: Request Text Mode for SMS messaging
void GprsTextModeSMS(){
  Serial.println( "AT+CMGF=1" );
}

void GprsReadSmsStore( String SmsStorePos ){
  Serial.print( "AT+CMGR=" );
  Serial.println( SmsStorePos );
}

// EN: Clear the GPRS shield message buffer
void ClearGprsMsg(){
  msg = "";
}

// EN: interpret the GPRS shield message and act appropiately
void ProcessGprsMsg() {
  if( msg.indexOf( "Call Ready" ) >= 0 ){
   //  Serial.println( "*** GPRS Shield registered on Mobile Network ***" );
     GprsTextModeSMS();
  }

  // EN: unsolicited message received when getting a SMS message
  if( msg.indexOf( "+CMTI" ) >= 0 ){
   //  Serial.println( "*** SMS Received ***" );
     // EN: Look for the coma in the full message (+CMTI: "SM",6)
     //     In the sample, the SMS is stored at position 6
     int iPos = msg.indexOf( "," );
     String SmsStorePos = msg.substring( iPos+1 );
   //  Serial.print( "SMS stored at " );
  //   Serial.println( SmsStorePos );
     // EN: Ask to read the SMS store
     GprsReadSmsStore( SmsStorePos );
  }

  // EN: SMS store readed through UART (result of GprsReadSmsStore request)
  if( msg.indexOf( "+CMGR:" ) >= 0 ){
    // EN: Next message will contains the BODY of SMS
    SmsContentFlag = 1;
    // EN: Following lines are essentiel to not clear the flag!
    ClearGprsMsg();
    return;
  }

  // EN: +CMGR message just before indicate that the following GRPS Shield message
  //     (this message) will contains the SMS body
  if( SmsContentFlag == 1 ){
 //   Serial.println( "*** SMS MESSAGE CONTENT ***" );
 //   Serial.println( msg );
 //   Serial.println( "*** END OF SMS MESSAGE ***" );
    ProcessSms( msg );
  }

  ClearGprsMsg();
  // EN: Always clear the flag
  SmsContentFlag = 0;
}

Not related to Arduino, but I think the people reading the question might be interested to know z-wave protocol appears to be in, but not turned on, Windows 10 for the Pi.

I think you'd want to include a call to ClearGprsMsg() right before the line GprsReadSmsStore( SmsStorePos );.
Then, msg += String(SerialInByte); is probably wrong, see for example http://arduino.cc/en/Tutorial/StringConstructors:
// using a constant integer:
stringOne =  String(13);
Serial.println(stringOne);      // prints "13"


text:
Arduino-like boards with other microcontrollers
Are there any Arduino-like board designs that are NOT using an AVR chip, but perhaps a chip like the Z80 or the 6502?

Can you elaborate on what you mean by "Arduino-like"? Pin layout, IDE, etc. E.g. TI launchpad can be programmed using Energia which is an Arduino-like IDE and library based on Wiring but doesn't have the same pin layout.

What meaning do you put in Arduino-like ?  Support for Arduino development environment?

If you want to use PICs, maybe chipKit is worth a look.

Today is your lucky day: http://hackaday.com/2015/02/17/non-arduino-powered-by-a-piece-of-computing-history/

Z80 and 6502 are CPUs (not MCUs) of another time; I am not even sure you can find some to buy now! Why one would create some board around them today?

Teensy or Arduino Due (both ARM). TI Launchpad Series. Just to name a few.

You have to define what you mean by "Arduino-like" beyond just not using an AVR.
There's the Arduino Galileo using an Intel chip and supports the Arduino development tools, as well as the Arduino Due which is an Arm-based chip.
There's the Netduino which uses ARM chips (STMicro's) and is pin compatible with Arduino shields, but I don't know what the development framework is (other than it being in .NET), though this doesn't necessarily say much because not even all Arduino boards have the same pin compatibility (Nano boards are much smaller, LilyPad Arduinos which are round and semi-flexible, etc.)
Then there are related boards, but don't support the Arduino environment or any pin compatibility (TI Launchpad springs immediately to mind, but pretty much every manufacturer has some sort of demo board or development board for their MCU's).
There's a huge list of Arduino-like boards here (split into levels of compatibility, includes the official Arduino boards).

By Arduino-Like I mean a small board with the same or very similar physical dimensions of an Arduino Uno and a very similar feature set related to Analog and Digital I/O, memory, video, etc.

Define 'very similar'? And what video features does an Arduino have??


text:
How can I obtain the .hex of a file
I have an Arduino Yún running Openwrt-Yún 1.5.3 (which is the latest version, as I upgraded yesterday), and I am trying to obtain a .hex (compiled sketch), so that I can upload a sketch directly into the Yún. I know about compiled sketches, but there are no build directories in "C:\Documents and Settings\MY_USERNAME\Local Settings\Temp".
Where can I obtain the .hex of any file I have compiled, and how?

Have you tried enabling verbose compilation?

@IgnacioVazquez-Abrams - Yes: I know what the build is called and its location whilst I upload, but after I have uploaded, nothing.

Compile the sketch and in log it is shown where the hex is stored. Then you have to copy from there, because its in temporary

As noted in comments, enable verbose compilation and look at the output to find the temporary-directory location. (Click File, Preferences, verbose compilation.)
Note, after you click File, Preferences and the preferences window appears with its half-dozen items, you should also see a note about directly editing preferences in the preferences.txt file.  Edit that file (using a plain-text editor, not a word processor) when the arduino IDE is not running.  Change the line
preproc.save_build_files=false

to
preproc.save_build_files=true

so the .hex files in the temporary directory have a better chance of sticking around.
(I'm not able to test this suggestion on an MS-Windows system.  On my Linux system most build files stick around anyway in /tmp/)


text:
Programing other Atmel ARM chips using Arduino
Ok, i know professionals generally hate Arduinos, but I would like to know if it would be possible to program Atmel ARM chips using the Arduino IDE. By which I mean, not needing to modify the source code, just add another entry into the "hardware" folder and that's it.
We already know the Atmel ATSAM3X8EA (Arduino DUE) is compattible, but how about a similar chip, like the Atmel ATSAM3X8CA. Or maybe a Cortex-M4 one, like the Atmel ATSAM4E16EA or the Atmel ATSAM4S8CA.
The Atmel ATSAM3X8CA is the closest one to the Atmel ATSAM3X8EA the Arduino Due uses, a bit smaller and with less I/O.
If it isn't possible without much source code modding, I would like to know what would it take to make it work.
Thanks for your answers.

I haven't use those chips in particular but I thought most of the newer / higher end ATSAM devices already have an in-built serial / USB bootloader. It might be worth taking a further look into that.

Why would Professionals "hate" Arduinos. Or any other system that has a job to do and does it well enough? No doubt a certain (or uncertain) subset of "proFesSionals" 'hate' Arduinos, but their motivations are sketchy and probably make no sense in the greater order of things. || It's a shame that the Arduinos makers chose to present it in a cutesy and hip-speakish manner, but that would be irrelevant to a Professional, who would evaluate the system in terms of aims and achievements and not be deterred by irrelevancies. Correct processing is in order if one is not to get one's wiring crossed.

My point exactly when I Try to explain to people the advantages of the Arduino platform. It has an objective and it accomplishes that objective perfectly, to give people an easy way of programming microcontrollers that doesn't require fiddling around with settings, fuses, pin declarations and so on. I'd like to bring that ease of use to other Atmel SAM chips, without removing the possibility of using, say, Atmel Studio as well to program them.

I'm voting to close this question as off-topic because it requires knowledge of non-Arduino Atmel parts and therefore belongs on EESE where it was originally and properly asked, not here.

@ChrisStratton not quite so: they're basically asking for ports of the Arduino core libraries/etc. for chips not used on a regular Arduino board.

...which is task which requires knowledge found there, rather than here.

Yes it is possible. IDE 1.5.+ support different platforms, as they call it. Where the AVR and sam are provided by stock. Others are possible.
It is fairly involved setup. In short; within each platform there are the following files:

boards.txt, defines the individual boards using the similar processor.
platform.txt, defines the compiler arguments
programmers.txt, defines how to program it.

With corresponding sub directories to match, under the variants/ folder.
I have not found an complete tutorial on the matter. However, their
Arduino IDE 1.5 3rd party Hardware specification
An overview of the platform architecture proposed for Arduino 1.5
are a great place to start.
I have not done much with SAM. I do notice that programmers.txt is empty. So it must be done another way.


text:
Installing Ports for Arduino Nano on Mac OS X Yosemite
Just starting with Arduino and have gotten stuck at the first hurdle: trying to connect an Arduino Nano with my Mac Book Pro which runs 10.10. I can't seem to find the right port as all suggestions have bluetooth in the name and none with USB anything. Also the post list does not change when I plug/unplug the Arduino. Looking at http://arduino.cc/en/guide/macOSX#toc3 it says that I need to install FTDI software to get the USB port to show, however, having done this it still does not work. Any suggestions?
Thanks,
Calum

If this is a genuine nano from arduino.cc then the FTDI driver is what you need; if it is from someone else it could require a different driver or not be functional at all.  If you do apple-about_this_mac-system_report you can see a list of USB devices, if you can find the VID/PID associated with your board and add it to your question or do a web search on it that would help a lot.

Had exactly the same problem. Also using 10.10 and just got an Arduino. What worked for me was using a different cable. The one that came with my Arduino Uno only provided power not data. If you have a printer, it might have the right cable, just test it quickly.
Edit: In addition, whilst trying to find solutions, I also installed 64bit mac FTDIUSBSerialDriver_v2_2_18.dmg. I'm not sure if it made a difference. As after installing it and using the original cable the problem persisted.

Hopefully that was not an official board but a knock-off, if the cable it came with was bad.

Are you using a USB hub? I had problems with my MBP when the Arduino was on a hub. Attached directly to the mac it was fine.


text:
Is it possible to connect many arduino uno in one pc?
We have many Arduinos and we will be putting each of them in a cubicle. All of them are connected to only one PC. The PC will stand as a server were you can control your Arduino there.

http://forum.arduino.cc/index.php?topic=407.0 Seems like it is possible, you just have to do more than just plug multiple Arduinos into the pc.

Slightly beyond trivial on a recent Linux, don't know about Windows or OSX.

Modern FTDI device driver should be fine, that forum post is from 2009. As long as each arduino gets a unique COM port number, I don't see why it wouldn't work.

If you can test the idea using two arduino, it should scale to any number (assuming there's no artificial restriction in the arduino IDE source code. The days of COM1/2/3/4 are long gone, they should be enumerating the port numbers from the OS instead of guessing.) Try it and see?

Yes, you can connect multiple Arduino UNO (USB) boards to a single PC. There's a simple way and a more advanced way to manage it.
The simple way is, having multiple boards plugged in, but using only one Arduino Software IDE to control one board at a time. (IDE = Integrated Development Environment. Some elements of the Arduino system use non-standard technical terms.) Use the Tools > Port menu to select which one of the attached boards to control. The selected board type and port appear in the lower right status bar.
A more advanced way to manage multiple boards, is to open multiple Arduino Software IDE instances -- each instance has its own independent Tools > Port setting. You could then edit, verify, and upload two different "sketches" (programs) to two different boards, without losing your place and without having to constantly change the Tools > Port setting. This would be convenient if you were developing a communications protocol between two or more boards.
This multiple-ports technique won't work unless you launch another instance of the Arduino Software IDE, without closing the first one. It isn't enough to use the File menu to open another window, because then you just get another window that shares the same Tools > Ports setting. Changing the ports setting on one window, changes the setting on all of the windows that belong to that instance. To support multiple boards at the same time, you have to actually launch the Arduino Software IDE again, without closing the first one, to create a second instance.
Usually you'd expect each window would represent a unique document, and they'd all be related to the application. But Arduino Software IDE has a hidden dependency between its windows. Whenever you restart the IDE, that opens a new and invisible instance of the IDE, where it remembers the board and port settings. If you use the File menu to open a new window, that new window is still part of the same IDE. So changing the Tools > Port setting on one window, changes that setting for all of the windows that belong to that instance of the IDE.
But if you restart the Arduino Software IDE (e.g. Windows Start Menu > Arduino-1.6.0), without closing the previously opened IDE, then you get a second instance. If you pay attention to the port setting visible on the lower right status bar of each window, you can distinguish which windows belong to which IDE instance.
Each time you launch the Arduino Software IDE, you start a new instance of the software, that can talk to one board. Each instance of the IDE can have an unlimited number of windows, but they all share the same Tools > Port setting. If you re-launch the Arduino Software IDE again without closing it first, then you get a second instance that can have a different Tools > Port setting, and thus control another board at the same time.
Verified on Windows 7, Arduino Software IDE 1.6.0, with two Arduino UNO revision R2 boards (firmware rev 0001), Arduino device driver 1.0.0.0.

How many instances of the IDE (and serial monitor) can one have running at once?

I don't think the OS places any artificial limit on the number of instances -- it's just like any other software as far as the computer is concerned. The installed hardware is what will limit how many useful instances you can open.

Note that the Arduino IDE is probably not the best way to communicate with the boards at runtime - at most it is a tool for development and test programming, but probably should not be used for a mass-rollout programming.  And it is almost certainly not what would be wanted for runtime communication - choose a solid standard or custom serial application for that instead.

@ChrisStratton and what serial application you think of?

I've run into the same question my self just on a Mac so in case anyone with Mac run into it: It is possible to connect and use many Arduinos to Mac at the same time. To do so run $ open -n /Applications/Arduino.app/ which will open a second instance of the Arduino IDE and you'll be able to select the Board and Port of each one and open multiple Serial windows. Notice that each Serial window has the path to the serial device which will help you know which window connected to which Arduino.

yes, you are only limited by the number of USB ports you have, however you have to consider is this is the best way to achieve what you are trying to do. You can get an ESP8266 device like the nodemcu, or something that gives you a wireless connection. With this, you can connect infinite number of devices to the central PC wirelessly. A Bluetooth module is also a good idea, it all depends on your budget and what you are trying to achieve.

I connect multiple arduinos to my  ubuntu system. I use text editor to write code and upload code and read output from terminal.
List arduino devices
$ ls /dev/ttyACM*
/dev/ttyACM0    /dev/ttyACM1

To upload code to arduino
# to arduino 1
$ arduino --port /dev/ttyACM0 --board arduino:avr:uno --upload bt/bt.ino

 # to arduino 2
$ arduino --port /dev/ttyACM1 --board arduino:avr:mega --upload bt/bt.ino

To check output
$ screen /dev/ttyACM1 115200

$ screen /dev/ttyACM0 9600

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to upload program to board using Arduino sketch ver 1.6?
I am having problems uploading my program. I have been using the verify button aka the "checkmark" to upload my programs. I assumed that this was the correct button but now I am having problems uploading. When I attempt to use the "upload" button I get the error "can not open device". What am I doing wrong? How can I fix this error code?

install the device drivers for your Arduino!
steps to follow are mention in arduino website!

It's possible the port or the board got changed, check the tools menu.

Check Tools->Board, Tools->Port, and Tools->Programmer

The "problem uploading to board" error message includes this link to arduino.cc troubleshooting guide: http://www.arduino.cc/en/Guide/Troubleshooting

The checkmark button is used to compile your program (which "verifies" your code), but does not upload it to the board. The "arrow" button is used to compile and upload your program.
If you cannot connect to the device, make sure the correct COM port is selected on the Tools->Ports menu, and make sure you have the correct board selected on Tools->Board (usually an Arduino UNO).
If you have not installed the drivers yet, you will not have a port present for your Arduino. If that is the case, here is a great tutorial that will help you get everything installed and set up correctly: https://learn.adafruit.com/lesson-0-getting-started


text:
GSM Modem with MAX232 to Arduino Serial?
I have GSM modem that has MAX232 interface for RX/TX/GND on three pins.
Is it possible to interface Arduino in some way?
Tnx for help.

Yes, with another MAX232, or bypass the MAX232 somehow.

Tnx, should lines be exchanged on another max232? rx,tx->tx,rx

Of course. Otherwise you'll be transmitting to a transmit pin, not a receive pin.

Thank you for confirmation, something else doesn't work :)


text:
Determining power consumption with Arduino and JeeLib
I built a basic LED blinker to serve as a car theft deterrent. Originally I was using a 9V battery and delay() but I've refined my approach to consume less power. Here's my code, utilizing the JeeLib library:
#include <JeeLib.h>

int led = 13;
ISR(WDT_vect) { Sleepy::watchdogEvent(); }

void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

void loop() {
  blink_quick();
  blink_quick();
  Sleepy::loseSomeTime(8000);
}
void blink_quick() {
  digitalWrite(led, HIGH);
  Sleepy::loseSomeTime(250);
  digitalWrite(led, LOW);
  Sleepy::loseSomeTime(250);
}

It just blinks twice every 8 seconds. I also used 4 AA batteries as they have a higher amperage rating. How long should this system work before I need to replace the batteries?
My thinking is that AA batteries offer 2000mAh and an Arduino typically consumes about 45mA on average. If I were running the above code with delay() instead of the JeeLib functions, it would last for 44 hours. Let's call one cycle the two blinks and the following 8 seconds of rest. I am confused about how long I should factor in for the digitalWrite(led, HIGH) and the corresponding 'low' call, because the rest of the time, the circuit is using JeeLib. I am just interested in figuring out how long I can let this run without changing the batteries, and admittedly I am not experienced enough to tell definitively.
Thanks!

Did you already go through the countless "how long does X run on Y batteries" questions here?  [moderator note: at the moment of writing "here" was EE.SE]

@PlasmaHH I went through a few, but I figured JeeLib changes a few things and I couldn't find much on that specifically even though it seems to be very popular for this kind of Arduino setup elsewhere.

I also understand that it is difficult to give an exact rating, but could it run for a week, a month? I'm really confused as to how to estimate.

What board are you using? For example, the Uno has a lot of other components that will consume power, even if you sleep the main processor. Instead use something like a Pro Mini.
You can bypass the voltage regulator, and just supply 4.5v by using 3 AA batteries. You can even use just 2 AAs if you have the 3.3v version. The lower the voltage the less current the ATMega uses.
Most importantly, measuring the power consumption using a multimeter. Measure the current the led uses. Disconnect the led, and measure how much the arduino uses. Use this handy Battery Life Calculator, and just fill in those numbers.
Run the led with the lowest current, where the led is still visible enough. Running a power-led at just 1mA will still give a decent amount of light.
In your situation, if coded correctly, power usage of the ATMega is negligible. The only real power user is the led. If you run the led at 1mA, and use a set of AA batteries, you get around 3.5 years of running time, no problem.

As mentioned in another answer use a multimeter to measure.  However I would recommend using the cars battery to power the system.  A parasitic draw on a cars battery of under 1 amp is considered acceptable (per what I learned in school).  A parasitic draw is current used while the car is off.  Get a clamp ammeter and check your parasitic draw and if you have the available amperage to spare run it from your battery. To check your parasitic draw place the clamp around the ground wire (or multiple ground wires) at the battery terminal.
If you run it from your car battery you will never have to worry about changing the battery and it becomes a set and forget system.

I have a lot of detail about here: Power saving techniques for microprocessors

Let's call one cycle the two blinks and the following 8 seconds of rest. I am confused about how long I should factor in for the digitalWrite(led, HIGH) and the corresponding 'low' call, because the rest of the time, the circuit is using JeeLib.

To answer this specific question, we can work out a "power budget" by taking the large consumption time (eg. the LED being on) and working out how much that is, as a fraction.
So in your case you have the LED on for 500 ms every 8 seconds. That is:
8 / 0.5 = 16

That is, 1/16th of the time. Or, putting it another way:
0.5 / 8 = 0.0625

So, let's say the LEDs use 20 mA. The average consumption then is:
0.020 * 0.0625 = 0.00125 A (1.25 mA)

And let's assume that while asleep it uses 1 mA. So the total consumption on average is:
1 + 1.25 = 2.25 mA

So if you have a 2000 mAh battery, you would get:
 2000 / 2.25 = 888.88  hours

However as others have pointed out, this is pretty meaningless if you use a development board. The on-board LED, the voltage regulator, the USB chip etc. will use much more power than you save by going to sleep. You have to move to a low-power or custom design, which minimizes these extra effects.
With careful design you should be able to get the sleep usage down to around 6 µA with the watchdog timer to wake you up.


text:
Using I2C: Master Reader and Writer
I'm using I2C and the Arduino Library (Wire) to communicate between two Arduinos, and my code isn't working. It's supposed to read in an int from the slave, write a value to the slave, then read back that value. I'm expecting "0 4", but i keep getting "0 0". Does this mean that the slave isn't registering the write?
Master code:
#include <Wire.h>

void setup()
{
  Wire.begin();
  Serial.begin(9600);
  ffsis();
}

void ffsis()
{
  //request i
  Wire.requestFrom(2, 1);
  int i = Wire.read();
  Serial.print(i);

  //send n seed
  Wire.beginTransmission(2);
  Wire.write(12);
  Wire.endTransmission();

  Serial.print(" ");

  //request n
  Wire.requestFrom(2, 1);
  int n = Wire.read();
  Serial.print(n);
}

void loop()
{
  delay(100);
}

Slave code:
#include <Wire.h>

void setup()
{
  Wire.begin(2);
  Wire.onRequest(requestEvents);
  Wire.onReceive(receiveEvents);
}

void loop(){}

int n = 0;

void requestEvents()
{
  Wire.write(n);
}

void receiveEvents(int howMany)
{
  int n = wire.read();
}

int n = wire.read();

"Wire" should be capitalized.
Amplifying on Ken's reply, you have two variables called "n", and the global one should be declared volatile. Also, I2C deals in bytes, not ints, so preferably do this:
#include <Wire.h>

void setup()
{
  Wire.begin(2);
  Wire.onRequest(requestEvents);
  Wire.onReceive(receiveEvents);
}

void loop(){}

volatile byte n = 0;

void requestEvents()
{
  Wire.write(n);
}

void receiveEvents(int howMany)
{
  n = Wire.read();
}

In addition, the address 2 is a reserved address.

Address 0 is reserved as a "broadcast" address, addresses 1 to 7 are reserved for other purposes, and addresses 120 to 127 are reserved for future use.

You should choose an address in the range 8 to 119.
Reference

I2C - Two-Wire Peripheral Interface - for Arduino
Official I2C specification

Since you have
int n
in the receiveEvents function, you're making a new local variable, not using the global n variable.

Your answer is correct but it could be made better if you provided further explanations on variable scopes in C/C++, and maybe post the updated code.


text:
Arduino Board with Microphone
I have this microphone (http://www.digikey.com/product-detail/en/CMA-4544PF-W/102-1721-ND/1869981) and an Arduino Uno board. I'm trying to read audio values off of my microphone (to test the noise of something (in dB)). I'm very new at this kind of stuff so keeping it simple would really help me out! I have a bunch of different capacitors, LM386N op amps, a bread board, and many resistors. Could someone provide a code and schematic that could help me get data off of my mic? I've tried using this schematic: http://wiring.org.co/learning/basics/microphone.html
but couldn't get the code to download onto a Wiring S board due to a "timeout" error and it not being able to "connect with the programmer".
Any and all help would be much appreciated!!

You can use Maxim MAX4466 op-amp which works very well with Arduino. There is a breakout available for the same for arduino at Adafruit here. The chip has a select-able gain from 25x-125x. This amplifies works very well to get a nice waveform for audible noise. There are a couple of libraries available for the waveform that you record and can translate it to frequencies. You can also use it to distort or change the voice. Here is a schematic of the circuit if you want to make one yourself.

Very interesting stuff. As you are new to this kind of stuff i can suggest you, instead of explaining ( because videos are cool), to watch this video that explains very clearly how to use the lm386 with some filters. That video is a project about controlling the arduino through whistling. Hope that helped.

The LM386 is an amplifier that is meant to drive a speaker. What you're looking for is a preamplifier, like the TL072 (cheap) for example, which is meant to amplify a microphone.
Most decent preamps require more than 5V. The OPA2134 is a more expensive opamp that can run off 5V. There are others but not all readily available and cheap.
Now if it's just for fun there is no need to be too fussy. Probably that's why in the arduino world you'll find many examples of people using LM358 and LM386 as microphone preamps.
What you probably don't want to hear is to look in the manuals. But actually in those manuals you find example schematics for all the different use cases. And you'll find the amplifier use case in there too for lm386: on page 11 and 12. That's what you are looking for. To start.
Next you need to bias the output to +2.5V. You do this with a voltage divider. Two registers of say 100k back to back from your arduino 5V vcc output to GND. They 'divide the 5V between them' giving you 2.5V in the middle. That's where you connect the output of your opamp and also one of the analog input pins, say A0.
Be aware that you should start with a small(er) amplification factor. Because amplifying your microphone voltage above 5V peek to peek would fry your arduino pin.

There is an Ap called Db, it works great on my iphone. I have had it a long time. I think it was $0.99 at the time.


text:
How to calculate phase shift between two square waveforms with Arduino DUE
I have two square wave signals with the same frequency. I want to measure the phase shift between these two signals. There will be a small phase difference between two signals. (0-90 degree) and the frequency will vary in the range 100mHz - 50kHz. I am using an Arduino DUE (ATMEL ATSAM3X8E AU ,ARM)
I tried to use "micros()" for timer functionality to get 2 different times and then calculate the phase shift using the following code:
int led=47,count1=0,count2=0,temp=0;
int i=0,j=0;
float time1[3]={0,0};
float time2[3]={0,0};
float freq1=0,freq2=0;
float period1=0,period2=0;
float ps=0;

void setup()
{
      Serial.begin(9600);
      Serial.println();
       Serial.println();
      pinMode(31,INPUT);
      pinMode(33,INPUT);
      pinMode(led,OUTPUT);
      digitalWrite(led,HIGH);
      noInterrupts();
      attachInterrupt(31,in1,RISING);
      attachInterrupt(33,in2,RISING);
      interrupts();
}

void in1()
{      noInterrupts();
       switch(i){
           case 0 : time1[i]=micros(); i++;  break;
           case 1 : if(j==1){time1[i]=micros(); i++; break;}
       }
       interrupts();
}
void in2()
{      noInterrupts();
       switch(j){
            case 0 : if(i==1){time2[j]=micros(); j++; break;}
            case 1 : if(i==2){time2[j]=micros(); j++; break;}
       }
           if(j==2){
             period1 = (time1[1]-time1[0]);
             period2 = (time2[1]-time2[0]);
             freq1 = 1000.0/period1;
             freq2 = 1000.0/period2;
             ps = (((time2[1]-time1[1])*360.0)s/period1);
          if(freq1==freq2){
          Serial.println("");
          Serial.print("TIME1[0] = ");
          Serial.print(time1[0],6);
          Serial.print("\t TIME1[1] = ");
          Serial.print(time1[1],6);
          Serial.print("\t DEL1 = ");
          Serial.println(time1[1]-time1[0],6);
          Serial.print("TIME2[0] = ");
          Serial.print(time2[0],6);
          Serial.print("\t TIME2[1] = ");
          Serial.print(time2[1],6);
          Serial.print("\t DEL2 = ");
          Serial.println(time2[1]-time2[0],6);
          Serial.print("\t x = ");
          Serial.print(time2[0]-time1[0],6);
          Serial.print("period1(ms) = ");
          Serial.print(period1,6);
          Serial.print("\t period2(ms) = ");
          Serial.println(period2,6);
          Serial.print("freq1 = ");
          Serial.print(freq1,6);
          Serial.print("\t freq2 = ");
          Serial.print(freq2,6);
          Serial.print("\t Phase Shift = ");
          Serial.println(ps,6);
          }
          else {
          i=0;j=0;
          interrupts();
          }
       }
       interrupts();
}
void loop()
{
       ;
}

When I run this code I am not getting any errors, but in high frequency (above 400 Hz) Ihave a problem. When I tested at 0 degrees, this code produced this output:
400 Hz 1.152 degree
500 Hz 1.440 degree
600 Hz 1.727 degree
700 Hz 2.015 degree
800 Hz 2.304 degree
900 Hz 2.592 degree
1 kHz  2.880 degree
2 kHz  5.760 degree
3 kHz  8.649 degree
.
.
.
10 kHz 28.8 degree

Each frequency has lowest degree that this code can calculate.
How can I fix this code? Is it possible to calculate the phase shift between two square wave signals this way?

First make sure you limit the data sent to the serial port inside your ISR when the interrupts are disabled. At 9600 baud it takes 1ms to send one byte over the serial link.

@Alex the Due might have hardware serial, which is dealt with asynchronously by the hardware UART/USB. The Due is a powerful Cortex M3 I doubt there is any processing issue there..

chaya have you looked at an oscilloscope and seen if the numbers are correct, or even close at all?

chaya your output doesn't match the strings shown in the code, where are the lines showing "period" and "phase shift"?

@KyranF. I understand the asynch part but it still takes 1ms per byte. The only thing that can help here is buffering (FIFO) but eventually you will run out of buffer space anyway.

The best solution would be to just capture time in ISR1 and ISR2. And then subtract the values and display the difference in the main loop at a slower speed. Obviously you may miss a few samples every now and then.

With 0° you have two inputs triggering interrupts at the same time.  That can't happen.  You can't run two interrupts at the same time, so the second one gets queued up until the first has finished.
With all that serial printing in there there's going to be quite a delay between one interrupt triggering and the next one being allowed to trigger - giving you skewed results.
I would suggest passing your signal through an XOR gate so that you end up with a single small pulse that represents the phase shift between the two signals.

XOR won't tell you which one happens first

You could look at A XOR B to get the length of the pulse and A to figure out which one came first.

I agree. XOR would be nice plus using a timer in capture mode. It's still fishy when you get close to 0°.

You could implement a phase detector (e.g. Type 2) and filter (charge pump) to produce a voltage proportional to phase. A type-2 PD would be sensitive to neg or pos phase shift.

Even if your code worked perfectly, with zero processing latency, you still are working with a timer resolution of only 1 microsecond.  If I did my math correctly, that means at 50 kHz, the smallest phase difference you can detect is around 18 degrees.  At 100 MHz, 1 microsecond is 100 complete cycles.  You probably want to look into hardware specifically designed for phase detection.

That's "mHz" (small m) -- millihertz, not megahertz.

Oops.  Well, the 50 kHz limit still applies.  He didn't specify his needed precision, but one degree precision would limit you to 2.7 kHz.

I think you can at least get a lot closer with the Due as in my answer, although I'm not sure if 50kHz is reachable. Using a 42MHz timebase gives just barely enough resolution, and 20us per cycle is just enough to get some calculation done. The most obvious problem is that the serial can't possibly send 50,000 reports per second, so there would have to be some aggregation/decimation there!

Good point, @hobbs.  I should be more explicit that my limit is referring to the OP's code that uses the micros() function to do the timing.  Using the timer directly can get you better resolution.

Connect the two signals to the TIOA pins of two different timer/counter channels on the same timer/counter block (either TIOA0 and TIOA1, which are Arduino pins 2 and A7, or any two of TIOA6, TIOA7, and TIOA8, which are Arduino pins 5, 3, and 11, respectively).
Set the two timer channels to capture mode, "up" counting, and internal clocking at the fastest rate that seems appropriate (I don't see any reason not to use TIMER_CLOCK1 = 42MHz on the Due). Set them both to load RA on rising edge of TIOA, and RB on falling edge. Assuming TIOA0 and 1:
pmc_enable_periph_clk(ID_TC0);
TC_Configure(TC0, 0,
    TC_CMR_TCCLKS_TIMER1 |
    TC_CMR_WAVSEL_UP |
    TC_CMR_LDRA_RISING |
    TC_CMR_LDRB_FALLING
);

pmc_enable_periph_clk(ID_TC1);
TC_Configure(TC0, 1,
    TC_CMR_TCCLKS_TIMER1 |
    TC_CMR_WAVSEL_UP |
    TC_CMR_LDRA_RISING |
    TC_CMR_LDRB_FALLING
);

Set them both to generate interrupts on RA load:
TC0->TC_CHANNEL[0].TC_IER = TC_IER_LDRAS;
NVIC_EnableIRQ(TC0_IRQn);
TC0->TC_CHANNEL[1].TC_IER = TC_IER_LDRAS;
NVIC_EnableIRQ(TC1_IRQn);

Enable both clocks, and synchronize them so that they're both 0 at the same moment:
TC0->TC_CHANNEL[0].TC_CCR = TC_CCR_CLKEN;
TC0->TC_CHANNEL[1].TC_CCR = TC_CCR_CLKEN;
TC0->TC_BCR = TC_BCR_SYNC;

And handle the interrupts:
void TC0_Handler() {
    uint32_t status = TC0->TC_CHANNEL[0].TC_SR;
    if (status & TC_SR_LDRAS) {
        uint32_t tm = TC0->TC_CHANNEL[0].TC_RA;
        // rising edge of TIOA0 happened at "tm",
        // do something here to deal with it...
    }
}

void TC1_Handler() {
    uint32_t status = TC0->TC_CHANNEL[1].TC_SR;
    if (status & TC_SR_LDRAS) {
        uint32_t tm = TC0->TC_CHANNEL[1].TC_RA;
        // rising edge of TIOA1 happened at "tm",
        // do something here to deal with it...
    }
}

(Just defining functions with those names registers them as interrupt handlers, using weak-symbol magic).
If you choose to use TIOA6/7/8, the clock will be ID_TC6/ID_TC7/ID_TC8, and the EnableIRQ will be TC6_IRQn/TC7_IRQn/TC8_IRQn, but the TC_Configure calls will be TC2, 0 / TC2, 1 / TC2, 2, the SYNC will be issued to TC2, and the register accesses will be to TC2->TC_CHANNEL[0] / TC2->TC_CHANNEL[1] / TC2->TC_CHANNEL[2]. This is due to the way that the channels are grouped into blocks of three in the hardware. This is also why you have to use 0 and 1, or two of 6, 7, and 8; in order to sync the timers they have to be on the same block (and TIOA2 through TIOA5 aren't routed on the Due).
Because the clocks run at MClk/2 = 42MHz, the times you get will be in units of 1/42 microsecond, 42 times better than you get from micros(). Because the timer values are latched into the timer hardware before the interrupt is set, there isn't a problem if the two events come close to each other in time; you'll get the second interrupt after you finish handling the first, and the value in the register will still be valid (as long as you don't take so long that you miss more than one edge).
If you're interested in the falling edges, you can get those as well by setting the TC_IER_LDRBS bits and checking for status & TC_SR_LDRBS in your interrupt handlers.
Final advice: set your serial baud rate higher than 9600 if you can, you'll greatly decrease the amount of time you spend in Serial.print!


text:
Arduino voltage drop while communicating with another Arduino
I have an Arduino Uno rev 3 and an Arduino Nano in my Setup. I want to create a proof of concept, where one Arduino triggers the other via the Digital IOs.
Arduino 1 sets a blinking signal on a digital pin (500ms delay between high/low), which is received by arduino 2. If the signal is high, Arduino 2 triggers a LED (digital pin to LED+; LED- over 330 Ohm resistor to ground), so the signal gets looped through somehow. The grounds of the two Arduinos are connected, too.

Code Arduino #1:
void setup() {
  DDRD |=_BV(PD7); //Sets Digital Pin 7 as Output
}

void loop() {
 PORTD |=_BV(PD7); // equivalent with digitalWrite(7, HIGH);
 delay(500);
 PORTD &=~_BV(PD7); // equivalent with digitalWrite(7, LOW);
 delay(500);
}

Code Arduino #2:
void setup() {
  DDRD &=~_BV(PD7); //Sets Digital Pin 7 as Input
  DDRD |=_BV(PB0); //Set Digital Pin 8 as Output
}

bool set = false;

void loop() {
  if((PIND&_BV(PD7))==_BV(PD7)) { //true if digital pin 7 is set
    if(!set) {
      //PORTB |= _BV(PB0);
      digitalWrite(8, HIGH);
      set = true;
    }
  } else {
    //PORTB &=~_BV(PB0);
      digitalWrite(8, LOW);
    set = false;
  }

}

But instead of emitting a bright light, which can be seen if connecting the blinking signal directly to the LED, it emits a faint light. The voltmeter also shows an significant Voltage drop. Whilst the digital pin should have a voltage of ~5V when set to HIGH (never reached because of inner resitance inside the arduino), it measures about 1.6-1.8V.
I also switched the both Arduinos which showed the same result, so it shouldn't be a hardware defect.
Thanks in Advance!

Draw a schematic. That text description is very difficult to follow.

How are the two arduino's powered and at what voltage?

Both powered via USB, schematic is following

While you're at it, show us the code that's running on Arduino #2 as well.

Added Schematic and code sample

the line DDRD |=_BV(PB0); should be DDRB |=_BV(PB0); currently PB0 is set as an input so when you set it high it is just turning on the pull-up resistor, which is basically adding another ~10k in series with the LED, hence the dim light.

Works like a charm, thanks i didn't see that one

A couple of delays in the Arduido #2 if(!set) { } else { } might allow the LED to stay on long enough to be seen.
At the moment this is rapidly switching the LED whenever the digital pin7 is set.

Thought about that one too, but the else block is in another scope. The else condition reacts on wether or not the signal is set, and not the bool! The nested if(!set) has no else block and is encapsulated in the wrapping if.
For simplification, you could add an else block containing a return.

Misread that one.


text:
Arduino uploading to the wrong port
I purchased a half dozen fake Arduinos hoping to build a bunch of projects without paying a fortune. I have all the drivers installed, and the port shows up in the Arduino IDE. The problem is when I try and upload the code I get the following error:

can't open device "/dev/cu.wch": No such file or directory

I played around a little and tried running:
sudo ln -s cu.wch\ ch341\ USB\=\>RS232\ 1a1220  cu.wch

After running this a new port shows up called cu.wch, and if I select that it works.
The issue is the Arduino's port is cu.wch ch341 USB=>RS232 1a1220, but for some reason the IDE is trying to write to cu.wch. By linking the folders I can fix this but since it is a hack every time I restart my computer I have to rerun the command. Is there a way I can either rename the Arduino port or permanently link the folder?
I am using OSX 10.10 and Arduino IDE v1.6.3

I would guess the problem is the IDE not properly handling device names containing spaces. Consider your symlink a workaround rather than a hack - unless you want to repair the IDE itself.

You must download the CH431 drivers to your computer and restart. This will solve your problem. Google these drivers, you should be able to find them. If not, let me know and I can send you a link to my drive.

Already did that. Please note as I mentioned I am using OSX 10.10.2 Yosemite. Before 10.10 (Mavericks) this solution would have worked, but the update seems to have broken this method. Please read my question carefully where I said "I have all the drivers installed".