Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 1860
61  Using Arduino / Project Guidance / Re: arduino spaceship interface from arduino projects book on: July 29, 2014, 09:18:55 am
Phew!
62  Using Arduino / Installation & Troubleshooting / Re: What are I2C pins on Arduino Robot on: July 29, 2014, 09:10:02 am
Any ground will do.
63  Using Arduino / Programming Questions / Re: how to cast int from int[] to const char* on: July 29, 2014, 08:44:43 am
What are you trying to do?
64  Using Arduino / Interfacing w/ Software on the Computer / Re: Turn Serial Monitor Data into Graph? on: July 29, 2014, 08:26:57 am
Look at the Arduino/Processing examples
65  Using Arduino / Programming Questions / Re: how to cast int from int[] to const char* on: July 29, 2014, 08:23:01 am
Quote
It seem there is no value when I test by printf
There is no value, or the value is zero?

What are you trying to do?
Do you know what data is at addresses 1 and 2?
66  Using Arduino / Programming Questions / Re: New to Arduino - help converting float on: July 29, 2014, 08:03:50 am
Quote
'hi' is two characters,  it is simply invalid in C/C++
No, it really isn't.
67  Using Arduino / Programming Questions / Re: Conversion of angle on: July 29, 2014, 07:46:54 am
You have a roughly 205 degree range (-95 to + 110 degrees).
It isn't a programming issue to reduce it to a 140 degree range, it's arithmetic.
68  Using Arduino / Programming Questions / Re: How to get Int value ? on: July 29, 2014, 07:02:58 am
It doesn't matter which version of the IDE,
Code:
iny=t distance = data.toInt();
will not compile with the code you have shown us.
69  Using Arduino / Project Guidance / Re: #28015 ultrasonic rang finder on: July 29, 2014, 06:36:02 am
No, you only get extra points for knowing it has at least one other value.  smiley-wink
70  Using Arduino / Project Guidance / Re: arduino spaceship interface from arduino projects book on: July 29, 2014, 05:31:52 am
Code:
const byte greenLEDpin = 3;
const byte redLED0pin = 4;
const byte redLED1pin = 5;
const byte switchPin = 2;

void setup ()
{
  pinMode (greenLEDpin, OUTPUT) ;
  pinMode (redLED0pin, OUTPUT) ;
  pinMode (redLED1pin, OUTPUT) ;
  pinMode (switchPin, INPUT) ;
  // Pinmode - Right bar on Uno
  // Green wire is input, yellow wire is output
}

void loop ()
{
  int switchState = digitalRead(switchPin); 

  if (switchState == LOW)
  {
    //button is not pressed
    digitalWrite(greenLEDpin, HIGH) ;
    digitalWrite(redLED0pin, LOW) ;
    digitalWrite(redLED1pin, LOW) ;
  }
  else 
  { //button is pressed
    digitalWrite(greenLEDpin, LOW) ;
    digitalWrite(redLED0pin, HIGH) ;
    digitalWrite(redLED1pin, HIGH) ;
 
    delay(250); //quarter second
    digitalWrite(redLED0pin, HIGH) ;
    digitalWrite(redLED1pin, LOW) ;
    delay(250) ;
  }
}
  }
71  Using Arduino / Project Guidance / Re: arduino spaceship interface from arduino projects book on: July 29, 2014, 05:06:25 am
Is that how it is published in the book?

Yes, only with a couple modified notes to help me understand more.

Code:
digitalWrite(3, HIGH) ; // green LED
I truly do not understand this style of coding - call pin 3 something sensible, like "greeLEDpin", and then the comment is superfluous, and the code is easier to read and maintain.

(I'm not having a go at you chummer1010 - I'm shocked that a book aimed at beginners proliferates bad practice)
72  Using Arduino / Project Guidance / Re: Simulating a touch on a touch screen with an arduino on: July 29, 2014, 04:49:51 am
Quote
However I don't think that just grounding the end works
I do  smiley-cool

Get some anti-static conductive foam about the size of a finger-tip, stick a wire in it, connect the other end of the wire to the charger/USB connector's shell.

Touch foam to screen.
73  Using Arduino / Programming Questions / Re: Rotary Switch to change Arduino Scripts on: July 29, 2014, 04:44:41 am
Quote
This is definitely an analog rotary switch - basically 1 pole and 3 position.
If it has three positions it is definitely not an analogue device.

please use code tags when posting code.
74  Using Arduino / General Electronics / Re: how can connect arcad joystick (MaxFighter F-16) to arduino? on: July 29, 2014, 04:28:42 am
What sort of serial port is that?
Is it really a game port (15 pin D-type)?
75  Using Arduino / Programming Questions / Re: New to Arduino - help converting float on: July 29, 2014, 04:21:34 am
Why does the OP say this
Quote
I need to pass this data into ble_write(unsigned char *).
?
Pages: 1 ... 3 4 [5] 6 7 ... 1860