Show Posts
Pages: 1 ... 376 377 [378] 379 380 ... 600
5656  Using Arduino / LEDs and Multiplexing / Re: Charlieplexing issue on: May 13, 2012, 06:16:20 pm
The pins that are not driving LED's should be INPUT with the pull-up OFF, not ON (LOW not HIGH).
5657  Using Arduino / LEDs and Multiplexing / Re: Rx and Tx pins on: May 13, 2012, 06:09:17 pm
Yes, you can use them for data if you don't need them for Serial.  You might get a little noise on the RX line because the USB-to-Serial hardware is connected to it through a resistor.  Shouldn't be much problem if you are using it as an output but if you use it as an input for a high-impedance source you may get enough interference to cause problems.
5658  Using Arduino / Programming Questions / Re: error: conflicting declaration 'int SCK' on: May 13, 2012, 11:07:14 am
I didn't think I was including pin_arduino.h or does the environment do this automatically?

It's automatic.  Arduino.h is included automatically and that includes pin_arduino.h.
5659  Using Arduino / LEDs and Multiplexing / Re: Powering light strip from arduino? on: May 13, 2012, 10:51:06 am
Use and NPN transistor or an N-channel MOSFET to switch the voltage and current.  See this tutorial about high current 9and voltage) loads:
5660  Using Arduino / Programming Questions / Re: error: conflicting declaration 'int SCK' on: May 13, 2012, 10:47:49 am
"SCK" is the standard name for the SPI Serial ClocK pin (Pin 13).  You should choose a different name for your variable.
5661  Using Arduino / Programming Questions / Re: Code not showing Values on Second input on: May 13, 2012, 10:44:44 am
I think the problem is that you leave 'ended' set to true when you process your first input.  Then the second time through if there is not a full message in the buffer it gets processed anyway because 'ended' is true.

Add these lines:
           started = true;
            ended = false;   //////////  Add this
            index = 0;
if (ended)
 ended = false;  /////////  Add this

Alternatively you can use a single state variable:


switch (state)
    if (inChar == '<')
        state = STARTED;
        index = 0;


    if (inChar == '>')
        inData[index] = '\0';  // Terminate the string
        state = WAITING_FOR_START;
        inData[index++] = inChar;

Note that this code doesn't put the '<' and '>' in the buffer so they don't need to be removed in process().
5662  Using Arduino / Installation & Troubleshooting / Re: Arduino Nano - external 5V <-> USB communication on: May 13, 2012, 09:35:56 am
What model Nano do you have?  The Nano V3.0 schematic ( shows that everything is powered from +5V and USB power is used if other power is not available.  Same on the nano V2.3 schematic.  The nano description ( says :
The FTDI FT232RL chip on the Nano is only powered if the board is being powered over USB. As a result, when running on external (non-USB) power, the 3.3V output (which is supplied by the FTDI chip) is not available and the RX and TX LEDs will flicker if digital pins 0 or 1 are high.
That doesn't match the schematics but it MIGHT explain your symptoms IF your USB host isn't providing power for some reason.
5663  Using Arduino / Microcontrollers / Re: atmega 32 bootloader on: May 13, 2012, 08:24:23 am
Depending on how different the ATmega32 is from the ATmega328P you may need to write a 'varient' or 'core' for it.

I'd start by adding an entry in boards.txt for your board starting with the entry for Arduino UNO and changing the mcu from atmega328p to atmega32.  Then you can see what parts don't work.
5664  Using Arduino / Motors, Mechanics, and Power / Re: Servo or stepper? on: May 12, 2012, 06:16:42 pm
 If you used a stepper you would need to add some way to sense the zero position so I'd use a hobby servo.

You also don't need a driver/controller to drive it, just a separate 5 or 6 volt power source (they tend to draw more power than the Arduino power supply can easily handle).
5665  Using Arduino / LEDs and Multiplexing / Re: How to select digit for 7 segment (3 digit) on: May 12, 2012, 10:25:46 am
void display_digit(uint16_t ds1)
  uint16_t digit[3],i,loop_digit,dis;
  char num_led[18] = {
    0x50,0x80,0x00};  ///////////////// Added a code for 'blank'

  digit[0] = num_led[ds1%10];
  if (ds1 > 9)
      digit[1] = num_led[(ds1/10)%10];
      digit[1] = 17; ////////////////// Blank
  if (ds1 > 99)
      digit[2] = num_led[(ds1/100)%10];
      digit[2] = 17; ////////////////// Blank
  digitalWrite(ClockPin, LOW);
  digitalWrite(LatchPin, HIGH);
    dis = digit[loop_digit];
        digitalWrite(DataPin, LOW);
        digitalWrite(DataPin, HIGH);
      digitalWrite(ClockPin, HIGH);
      digitalWrite(ClockPin, LOW);
  digitalWrite(LatchPin, LOW);
  digitalWrite(LatchPin, HIGH);
5666  Using Arduino / LEDs and Multiplexing / Re: flux capacitor help on: May 12, 2012, 10:14:24 am
Rather then running a full cycle of the animation every time through loop() you should use global variables to keep track of where you are in the animation.  Study the BlinkWithoutDelay example to see how to add time delays between steps.  This way the loop() function can repeat much faster and you can make the button more responsive.
5667  Using Arduino / LEDs and Multiplexing / Re: Uno + Rainbowduino on: May 12, 2012, 09:58:39 am
So, are you trying to use the Arduino UNO as a USB-to-Serial adapter like in these instructions?
5668  Using Arduino / Programming Questions / Re: How do i use the Sparkfun Touch Shield to control pin 6 on the Arduino? on: May 12, 2012, 09:43:46 am
It's not working.

Oops...  I forgot to put pinMode(6, OUTPUT) in setup().  Does it 'work' if you add that?
5669  Using Arduino / Microcontrollers / Re: What can the ATTiny85 do? on: May 11, 2012, 07:56:09 pm
Doesn't the ATtiny85 have SPI hardware and a free timer?  Is that not enough to run ShiftPWM?
5670  Development / Other Software Development / Re: SoftwareSerial affects Time on: May 11, 2012, 07:50:42 pm
If you need to keep fairly accurate time you might want to invest in an RTC chip.  The Arduino UNO only has a ceramic resonator so it does not make a very good clock.
Pages: 1 ... 376 377 [378] 379 380 ... 600