Show Posts
Pages: 1 2 [3] 4 5 ... 20
31  Using Arduino / Project Guidance / Re: measure rotation of a bike wheel on: January 22, 2014, 07:30:15 am
Hall sensors mounted on spokes is going to present a wiring problem; at the least, slip rings would be required. Perhaps a better solution would be something like this. I am imagining one mounted to the forks and aimed at the rim of the wheel. The rim could be blackened out except where needed to get the resolution you desire. The linked device, being driven at 38khz, would eliminate any problems that may be caused by ambient light. - Scotty
32  Using Arduino / Project Guidance / Re: Large project, roughly 300 fairly bright lights individually controlled on: January 21, 2014, 07:45:05 am
Might the TLC5940 be  a good candidate? - Scotty
33  Using Arduino / Programming Questions / Re: Storing multiple values and then take average on: January 19, 2014, 06:05:49 am
You don't to store all the values read individually. Take the first reading and store it. Add all subsequent readings to the stored value. Finally, divide the stored value by the number of times the reading was taken. - Scotty
34  Using Arduino / General Electronics / Re: How do I know what resistors to use? on: January 18, 2014, 06:51:09 am
Quote
However running it at say 10mA will not be half as bright it will be brighter than that say three quarters as bright because perceived light brightness is not proportional to current.

Interesting! Thanks.
35  Using Arduino / Project Guidance / Re: Fuel Pump Sensor on: January 17, 2014, 06:59:52 am
So your problem using the device as is, is restriction? - Scotty
36  Using Arduino / Audio / Re: Audio Multiplexer advice on: January 13, 2014, 08:38:54 am
Thanks for the advice Grumpy Mike. Good to know to avoid starting off on a wrong path. - Scotty
37  Using Arduino / Audio / Audio Multiplexer advice on: January 12, 2014, 08:24:43 am
Seeking advice on the selection of an audio multiplexer to enable an output of multiple microphones to be selected. I've been investigating some analog multiplexers available but wonder if there is an IC more suitable to audio. Thanks - Scotty
38  Using Arduino / Project Guidance / Re: Motor with accurate feedback on: January 07, 2014, 09:35:52 am
A method I would consider using is an encoder strip running along the travel of the elevator. An opto interupter could read the steps of travel and another could read 'stops'. Something like image below. - Scotty

39  Using Arduino / Project Guidance / Re: MCP23008 and leds not working on: January 06, 2014, 10:16:34 pm
All too obvious now. Dang it! I hate it when I do that. Thanks for all your input guys. All is good now. Moving on. - Scotty
40  Using Arduino / Project Guidance / Re: MCP23008 and leds not working on: January 05, 2014, 02:57:37 pm
Bill, I don't understand.
According to the data sheet, the IO Direction Register address is 0x00.
When a bit is set, the corresponding pin becomes an input. When a bit is clear, the corresponding pin becomes an output.
- Scotty
41  Using Arduino / Project Guidance / Re: MCP23008 and leds not working on: January 05, 2014, 12:06:29 pm
Of course not; probably a copy/paste error. Error removed from sketch and post. However, makes no difference in the results. - Scotty
42  Using Arduino / Project Guidance / MCP23008 and leds not working on: January 05, 2014, 10:26:10 am
Hello folks. In an effort to introduce myself to I2C, I wired a MCP23008 port expander to an Arduino Uno and some leds. Seemed pretty simple but I can't get it to work. Below is a image of the connections.



I've tried the two sketches below:

Code:
#include <Wire.h>



void setup() {
    Wire.begin();                      // initialise the wire library and hardware

    Wire.beginTransmission(0x20);      // start talking to the device
    Wire.write(0x00);                   // select the IODIR register
    Wire.write(0xff);                   // set register value-all high, sets all pins as outputs on MCP23008
    Wire.endTransmission();    // stop talking to the devicevice
    Serial.begin(9600);
}
 void loop() {
    Wire.beginTransmission(0x20);      // start talking to the device
    Wire.write(0x09);                   // select the GPIO register
    Wire.write(0xff);                   // set register value-all high
    Wire.endTransmission();            // stop talking to the device
Serial.println ("on");
    delay(500);                        // wait for 1/2 a second

    Wire.beginTransmission(0x20);      // start talking to the device
    Wire.write(0x09);                   // select the GPIO register
    Wire.write(0x00);                   // set register value-all low
    Wire.endTransmission();            // stop talking to the device
Serial.println ("off");
    delay(500);                        // wait for 1/2 a second
}


Code:
#include <Wire.h>

byte i2cAddr=B0100000;//device ID


void setup(){
  Wire.begin();

    
}

void loop(){

  Wire.beginTransmission(i2cAddr);
  Wire.write(0x09);//select GPIO register
  Wire.write(B11111111);//set register value-all high
  Wire.endTransmission();
 
  delay(500);
  
  Wire.write(0x09);//select GPIO register
  Wire.write(B00000000);//set register value-all low
  Wire.endTransmission();

  delay(500);

}

I think they are essentially the same.
Either sketch, the leds remain unlit all the time.
I ran I2C_Scanner and it came back with an address of 0x20.
When the first sketch was ran, it did print alternately 'on', 'off' every half second to the serial monitor.
I switched the data and clock signals to A5 and A4 and I reversed polarity on an led but the results were the same.
I keep thinking it's gotta be something simple but I can't spot it. Help Please. - Scotty
43  Using Arduino / General Electronics / Re: New PCB production tool on: January 02, 2014, 07:06:17 am
Thanks for the link, tack. Interesting stuff saved for future reference, - Scotty
44  Using Arduino / Programming Questions / Re: Wire Library source on: December 29, 2013, 08:17:01 pm
Thanks Gentlemen. Learned something new. I did find the library via a search. I was assuming that all libraries would be in the same directory as the libraries I had downloaded. - Scotty
45  Using Arduino / Programming Questions / Wire Library source on: December 29, 2013, 03:07:00 pm
All ready to go with a small project to introduce myself to I2C. Found example code but I am having a heck of a time finding the Wire Library. I've been searching quite a while and have found explanations of the library but not the library itself. Would someone please point me in the right direction? Thanks - Scotty
Pages: 1 2 [3] 4 5 ... 20