Show Posts
Pages: 1 2 3 [4] 5
46  Topics / Robotics / Re: 12 Servo Quadruped - Servo Shield selection discussion on: February 07, 2013, 11:01:55 am
I've used an SSC-32 from Lynxmotion connected to an Arduino.

They use it for controlling a number of their hexapods.  I have it connected to 18 Hitec HS-645MG

47  Using Arduino / Programming Questions / Re: Programming question in LED's (Stuck) on: February 07, 2013, 10:09:45 am
Should that not read:

int Num =  - '0';

Because Num would be the  ASCII value of the character he typed.

EDIT:  That was for your original post Erik.  Your modified code is correct.

48  Using Arduino / Programming Questions / Re: Bitbang PWM on non-PWM pins on: February 07, 2013, 08:35:35 am
Just a simple question.  Is there a reason you need to leave the loop() function at all? Would it not be a tiny bit faster and more efficient to simply put a while(true) loop inside of the loop() and never leave it?   
49  Products / Arduino Due / Re: External interrupts on: October 26, 2012, 07:21:39 pm
Indeed I think he will have it all done before the Due actually gets out to the customers.   

Thanks for keeping us in the loop over the progress.  Looking forward to playing around with it.
50  Products / Arduino Due / External interrupts on: October 22, 2012, 01:10:30 pm
According to the new product page for the Due it states "interrupts 0 and 1 (pins 2 and 3 respectively)".   This is the only mention of interrupts on the page.   Are there not more than just two?
51  Using Arduino / Programming Questions / Re: Is it possible to use the digital OUTs as INs? on: October 05, 2012, 12:19:51 pm
How does it not relate to the posters question?
I am saying yes you can "use the pins named "DIGITAL" as digital INs"
At least this is my take on it, maybe I am wrong?
Whats the problem?

The original poster was asking if an Arduino sketch that can perform digital reads on the digital pins.   You stated you need a GUI front end and then proceeded to give him a Visual Basic program that talks over the serial port (and you left out the corresponding sketch to boot).
Discussing a GUI front end in VB it is about as far away from "is it possible to use the pins named "DIGITAL" as digital INs" as one can get.

Not trying to be a jerk about it but your post is a bit off topic.
52  Using Arduino / Sensors / Re: Get value from RFID tag and store it as a string on: October 05, 2012, 09:00:55 am
Also you could try this
53  Using Arduino / Sensors / Re: Trouble with HC-SR04 on: October 05, 2012, 08:56:53 am
By the way, you should set the trigger to LOW first before setting it to HIGH.  And you don't need 1000 microseconds.   The spec says 10 microseconds will do.

Try ch
void loop() {
  int duration, distance;
  digitalWrite(trigPin, LOW);  //  Added
  delayMicroseconds(2);          // added
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);        // changed to 10
54  Using Arduino / Sensors / Re: How can I speed up the ADC? on: October 05, 2012, 08:47:32 am
"void" is the type of the function - you call it a "little function", not a "little void".

I dunno.  I looked at that function and it seemed a 'little void' to me.  smiley-grin (Sorry it's bad joke day and I am just trying to fill my quota).
55  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Mega ADK Serial.print stale data issue on: October 05, 2012, 08:31:16 am

Does the Mega ADK  print out the header  "#HotJunction(C),ColdJunction(C)"  in your setup function?  Yet it is not re-printing it on the reset?
56  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 05, 2012, 08:15:31 am

Yes i connected a wire from A0 to GND directly too, and tried the ReadAnalogVoltage program, but it shows only 5v. And i havent tried the 54 digital pins , only the pwn outputs, but i think the problem is with the ATMega2560 ;/. And it doesn't have any shield on it, and i am using it on wood table.

What about the other analog pins?  Did you try A1-A5? 

57  Using Arduino / Microcontrollers / Re: Need some direction with using ATTINY85 on: October 04, 2012, 10:23:40 pm
58  Using Arduino / Programming Questions / Re: interfacing arduino to RFID, help on: October 04, 2012, 10:15:42 pm
There are a number of RFID readers out there.  I used an RFID ID-12 (SEN-08419) chip with the breakout board(SEN-08423) from Sparkfun.  

You basically hook it up to the serial pin.  When a card is swiped it sends the card ID over the serial line.  

Here is a small test program to give you an idea of how easy it is.  I X'ed  out the card id's (also from sparkfun).

char val = 0; // value read for serial port

char peopleCardID[][20] = {
char people[][20] = {
  "Ted", "Frank","Johnny","Franny","Bobby"};

void setup() {

void loop () {
  int i;
  char card[20] = "";
  if(Serial.available() > 0) {
    boolean bFound = false;
    while(Serial.available() > 0){
      val =; // read from the serial port
      if ((val >= 'A' && val <='Z') || (val >='0' && val <='9')){
        card[i++] = val;
    card[i] = 0;
    for (i=0;i<5;i++){
      if (!strcmp(peopleCardID[i],card)){
        bFound = true;
        Serial.print("Hello there ");
        Serial.println("!!  ");
    if (!bFound){
      Serial.println("Unknown Key!!!");

Also here is a link to a project someone did with it with more details. It has wiring diagrams and code as well.  

Adafruit also has an RFID shield that you can look at.    No wiring needed and she has a library and sample code to use.  Here is the link to the basic sample code
59  Using Arduino / Programming Questions / Re: Is it possible to use the digital OUTs as INs? on: October 04, 2012, 09:53:52 pm
As jonathanped said, they can be used for either input or output.  You have to call the pinMode function

So to make digital pin 10 an input
pinMode(10, INPUT);

To set it for output
pinMode(10, OUTPUT);

One thing to add though is that it doesn't have to happen in the setup function but almost always that is where you want to set it.   It can be set anywhere at anytime and you can even change the mode in the same program.  This is rare however and the only time I can think when one does this is with the PING sensor which requires you to send and receive a signal on the same pin.

Hope that doesn't add to the confusion.  smiley
60  Topics / Robotics / Re: Servo and Ultrasonic sensor on: October 04, 2012, 09:01:42 pm
If you are using the HC-SR04 the 1000 microsecond delay is a bit long.  

The specification doc says it should 10 microseconds (delayMicroseconds(10)).
Here is the doc:

Also you should specifically hold the trigger line LOW first for a little bit of time before setting it HIGH (just like the PING sensor).

Try the following code:
void loop() {
  int duration, distance,pos=0;
  digitalWrite(trigPin, LOW); 
  digitalWrite(trigPin, HIGH);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) / 29.1;
Pages: 1 2 3 [4] 5