Show Posts
Pages: [1] 2 3 ... 541
1  Using Arduino / Project Guidance / Re: X- Y- Laser Control with Joystick, Absolute vs. Incremental Work Envelope on: April 20, 2014, 07:15:35 pm
Did I plug and play wrong?
I can't see what you did from here so I can't tell.
2  Using Arduino / Microcontrollers / Re: Revive dead Arduino Nano on: April 20, 2014, 07:13:28 pm
I don't understand what you mean by:
Giving the Nano a kickstart via AVRdude makes the sketch work one time.
[/quote

I don't understand what you mean by:
Using USB to connect the Nano standalone again makes it play dead.
3  Using Arduino / Sensors / Re: Getting inputs from an USB Keyboard on: April 20, 2014, 06:51:52 pm
The Arduino MEGA ADK (http://arduino.cc/en/Main/ArduinoBoardMegaADK) has a built-in version of the USB Host Shield.

To program the USB Host chip (MAX3421E) read the datasheet for the chip.
4  Using Arduino / LEDs and Multiplexing / Re: 300 infrared sensors on: April 20, 2014, 08:03:41 am
I think you could use a processor with an 8-bit A/D and an SPI interface. 

The ATTiny85 (8-pin controller) has three pins SPI and two A/D pins.

The ATTiny84 (14-pin controller) has three SPI pins and five A/D pins.

The SPI interfaces can be daisychained and read at a million bytes per second.  I would use one ATTiny84 for each five IR inputs.
5  Using Arduino / Sensors / Re: Getting inputs from an USB Keyboard on: April 20, 2014, 07:31:40 am
To connect a USB peripheral to an Arduino you need something like a USB Host Shield.
6  Using Arduino / Microcontrollers / Re: Arduino Micro Frequency on: April 20, 2014, 07:29:38 am
my led blinks with a period time of around 1 seconds. This is not what i expected.
It should be "LIMIT 16000000" to get a blink frequency of one second.

How many instruction cycles does your loop take?   If you do half a million loops in one second it is doing about 32 instruction cycles per loop.  For a 32-bit comparison , a 32-bit increment, and a jump that doesn't sound too bad.  If you change your loop counter to 16 million you should end up with a 32-second loop.

If you don't want to use the Arduino IDE or libraries you might be better off at the AVRfreaks forum: www.avrfreaks.net
7  Using Arduino / Project Guidance / Re: X- Y- Laser Control with Joystick, Absolute vs. Incremental Work Envelope on: April 20, 2014, 07:19:43 am
Code:
const int XCenterVal = 512, YCenterVal = 512;  //  Values of pot input when centered
const int XpotSpeed = 200, YpotSpeed = 20;  // Scale value for controlling speed of movement (higher=slower)

  int XpotVal = analogRead(potpinX) - XCenterVal;
  int YpotVal = analogRead(potpinY) - YCenterVal;
  int servoAngleX = constrain(servoAngleX + (XpotVal/XpotSpeed), 180, 0);
  int servoAngleY = constrain(servoAngleY + (YpotVal/YpotSpeed), 180, 0);
8  Using Arduino / Microcontrollers / Re: Revive dead Arduino Nano on: April 20, 2014, 07:10:36 am
The Arduino Nano doesn't normally use Optiboot.  If you select the board "Arduino Nano w/ ATmega328" it will be expect the bootloader "ATmegaBOOT_168_atmega328.hex" at 57600 baud (see boards.txt).  Optiboot runs at 115200 baud so it is not a drop-in replacement for the expected bootloader.

To burn a fresh bootloader on your Nano you should:
 1) Select Tools->Board->Arduino Nano w/ ATmega328
 2) Select Tools->Programmer->USBasp
 3) Tools->Burn Bootloader

If you want an Optiboot bootloader on your Nano you can put the following in a Arduino/hardware/boards.txt:
Code:
##############################################################
nano328O.name=Arduino Nano w/ ATmega328 & Optiboot

nano328O.upload.protocol=arduino
nano328O.upload.maximum_size=32256
nano328O.upload.speed=115200

nano328O.bootloader.low_fuses=0xFF
nano328O.bootloader.high_fuses=0xDE
nano328O.bootloader.extended_fuses=0x05
nano328O.bootloader.path=optiboot
nano328O.bootloader.file=optiboot_atmega328.hex
nano328O.bootloader.unlock_bits=0x3F
nano328O.bootloader.lock_bits=0x0F

nano328O.build.mcu=atmega328p
nano328O.build.f_cpu=16000000L
nano328O.build.core=arduino
nano328O.build.variant=eightanaloginputs
##############################################################

After that (and restarting the IDE) you can use the "Arduino Nano w/ ATmega328 & Optiboot" board type to burn a fresh bootloader and do your uploads.
9  Using Arduino / Programming Questions / Re: Problem with converting variable types & serial communication on: April 20, 2014, 06:53:24 am
The problem with the third number is that you only store a number when it is followed by a comma:
Code:
      if(inChar==','){
        inColor[currentColor] = serialBuffer.toInt();
        currentColor++;
        serialBuffer = "";
      }
10  Using Arduino / Installation & Troubleshooting / Re: Power through USB is fine, but power through Vin is not working on: April 20, 2014, 06:32:42 am
If 12.93V is getting to the input side of the regulator and you are not getting 5V out the other side then replacing the regulator is likely to fix the problem.  If the 12.93V isn't getting to the regulator then you have a different problem, like a bad solder joint or burned trace.
11  Using Arduino / Project Guidance / Re: difference between these two shields on: April 19, 2014, 07:20:03 pm
The "adapter" is not a Shield.  It does not plug directly onto an Arduino board and establish reasonable connections.  To use the adapter you will have to wire the adapter pins to Arduino pins.
12  Using Arduino / Project Guidance / Re: Wall Plotter Question on: April 19, 2014, 07:14:43 pm
Under "Firmware" you will find the .pde file (pre-V1.0 Arduino sketch) to load into the Arduino.

Under "src" you will find the Java program that runs on the PC to control the plotter.
13  Using Arduino / Installation & Troubleshooting / Re: Power through USB is fine, but power through Vin is not working on: April 19, 2014, 06:56:52 pm
When you hook up Vin and Ground to the battery do you get 5V on the 5V pin (relative to Ground)?  If not, your 5V regulator is probably dead.  It is not used for USB power.
14  Using Arduino / Programming Questions / Re: Question about how sketch code is executed: on: April 19, 2014, 06:52:46 pm
The right way to do it is to reduce your 12-second sequence into a series of states.  Each time through loop() you can check your inputs and check to see if your system should switch to a new state or continue doing what it is doing.  This is called a "State Machine" model.  It is a way of eliminating the delay() calls that cause your program to be unresponsive.
15  General Category / General Discussion / Re: 3D printer on: April 19, 2014, 08:09:13 am
Try the RAMPS controller:
http://reprap.org/wiki/Arduino_Mega_Pololu_Shield
Pages: [1] 2 3 ... 541