Show Posts
Pages: 1 ... 4 5 [6] 7 8 ... 11
76  Using Arduino / General Electronics / Re: multi chip led series resistor math help on: March 31, 2013, 01:31:43 pm
ok hmm, its a strange little device. ya it lights at 6, at 7 any res (tested low ohms) dims it alot. i guess for this to be bright enough im going to have to go with 9 volts with a proper resistor. trying to incorporate a nice bright led into my dog collar, maybe this device is the wrong choice, im trying to keep the package small(its a little dog). too bad i got a bunch of em.
77  Using Arduino / Networking, Protocols, and Devices / Re: i2c attiny85 non responsive on: March 31, 2013, 01:02:44 pm
no, but im going to try this project again. ill keep you posted. im gonna dump a simple i2c sketch, maybe just getting the 2 to talk to eachother, then move forward one piece at a time. thanks pylon.
78  Using Arduino / General Electronics / multi chip led series resistor math help on: March 31, 2013, 01:00:57 pm
does this piece require a resistor off of 6volts? if so, whats the math, straight forward like any other led?
http://www.lumex.com/specs/SSL-LX20R6GD.pdf

thank you.
happy holidays smiley
79  Using Arduino / Networking, Protocols, and Devices / Re: i2c attiny85 non responsive on: March 22, 2013, 08:52:47 pm
no return value, set return flag to "1", would change to "0" upon success. im using pullups also. tried with and without lol. im stumped. i guess without the return the attiny isnt doing anything? got sda on pb0(pin5) and sck on pb2(pin7). pin 8 vcc and pin 4 ground. address on i/o expander is 0x20, a0-a2 grounded. 
80  Using Arduino / Networking, Protocols, and Devices / Re: i2c attiny85 non responsive on: March 22, 2013, 01:29:43 pm
yes i fused the attiny85 to 8mhz, and changed the lines in both .cpp and .h to reflect the same.

Code:
#define SYS_CLK   8000.0
#define F_CPU 8000000UL

im going to check for the return in a bit, ripped down the setup to play with 1307 breakout board that just arrived  smiley-twist

81  Using Arduino / Networking, Protocols, and Devices / Re: i2c attiny85 non responsive on: March 22, 2013, 10:38:30 am
yes, works as expected with an arduino uno. im sorry i should have mentioned that.
82  Using Arduino / Networking, Protocols, and Devices / i2c attiny85 non responsive on: March 22, 2013, 09:45:29 am
hello all, im not getting any response from this, im thinking the pcf itself might not be compatible since data sheet says compatible with most mcu's. have gotten other code to work on attiny including blink and some home brew stuff. this is just a test to lead to better stuff, and ive tried 2 different ic's and 2 different attiny's. datasheet here http://www.ti.com/lit/ds/symlink/pcf8574.pdf      also, instead of '0' (all on) ive sent different data, ie 254h which is some on some off.

Code:
#include <TinyWireM.h>


// address of PCF8574 IC on TWI bus
#define IO_ADDR 0x20
byte data = 0;
byte alloff = 0xFF;
void setup() {
  TinyWireM.begin();        // initialize the I2C/TWI interface
  TinyWireM.beginTransmission(IO_ADDR);
  TinyWireM.send(alloff);
  TinyWireM.endTransmission();
  delay(10);
  TinyWireM.beginTransmission(IO_ADDR);
  TinyWireM.send(data);
  TinyWireM.endTransmission();
}
void loop() {}
83  Using Arduino / Project Guidance / Re: Dumb Dad needs homework help!!!!!!! on: March 20, 2013, 08:31:17 pm
can use a for loop for the soundmaker
84  Using Arduino / Project Guidance / Re: Need ideas for additional features to my smart home project. on: March 20, 2013, 08:28:20 pm
humidity readings? also maybe volt/current load readings for each room? i was a facilities manager for a few years, we monitored load conditions and voltage, of course this was industrial so we had more than one phase. just a thought.
85  Using Arduino / Project Guidance / Re: Button Help - Trying to make LED go off when button is not pushed on: March 20, 2013, 08:24:42 pm
Code:
val = digitalRead(12);   // read the input pin
 digitalWrite(13, val);

maybe something like this?
86  Using Arduino / Project Guidance / Re: running bitlash scripts from the arduino on the arduino without serial input on: March 20, 2013, 08:21:43 pm
very nice project!  smiley
87  Using Arduino / Programming Questions / Re: interrupts with conditions on: March 20, 2013, 07:58:01 pm
Code:
#include <avr/interrupt.h>
volatile int doorlock;

void setup(){
pinMode(2,INPUT);
digitalWrite(2,HIGH);
attachInterrupt(0, doordoingsomething, FALLING);  // or attachInterrupt(0, doordoingsomething, RISING); or attachInterrupt(0, doordoingsomething, CHANGE);
doorlock = 0
// other setup
interrupts();  // starts the int's
}
void loop(){
if (doorlock == 1){  // if this = 1 then int has fired
alarmneedstohappen();
}
// normal loop stuff
}

void doordoingsomething();
doorlock=1; // sets flag to 1 so loop if catches it
}

void alarmneedstohappen();{
// we are here because int flag happened.
doorlock = 0 // reset int flag
// perform other alarm stuff of whatever
}
88  Using Arduino / Programming Questions / Re: I2C Arduino Uno Problem on: March 20, 2013, 07:43:18 pm
Wire.endTransmission(); should return a zero on success.

some very good information is here http://www.gammon.com.au/forum/?id=10896, should get you going and answer all your questions. it helped me alot.
89  Using Arduino / Programming Questions / Re: I2C Arduino Uno Problem on: March 20, 2013, 02:15:12 pm
Quote
you usually send 0x00 first to the device to tell it to get ready.

not all devices needs this, best to check the datasheet for your specific device(s).  smiley-grin
90  Using Arduino / Programming Questions / Re: I2C Arduino Uno Problem on: March 20, 2013, 01:31:55 pm
not sure if needed/helpful but

Code:
Wire.endTransmission();
Pages: 1 ... 4 5 [6] 7 8 ... 11