Show Posts
Pages: 1 [2] 3 4 ... 11
16  Using Arduino / Motors, Mechanics, and Power / Re: How to calculate the needed psu for my project. on: April 27, 2012, 10:36:28 pm
What about a nice Computer PSU , they'll have 5v for the arduino even the small ones are at least 1.5a @ 12v bigger , or you could divide it out among 2 PSU ,, and ther pretty cheap, especially if you have some junk/old/unwanter compters hanging around smiley Just a thought
17  Using Arduino / General Electronics / Re: power adaptor (110V mains to 9V DC) on: April 09, 2012, 05:49:36 am
looks like that will work- dont forget the large heat sink smiley
18  Using Arduino / Project Guidance / Re: Analog current draw on: April 08, 2012, 06:28:47 pm
let me figure this out ,are you trying to put/incert Voltage from a external power supply into a input on the arduino, to measure the supply or something ?
19  Using Arduino / Networking, Protocols, and Devices / Re: Send/Read more variables using I2C (NEED HELP!!!) on: April 08, 2012, 03:30:37 pm
hm - this one  may require some more thought, or some one that has ran that required setup , im only controlling a solar array a lcd and a Relay bank VIA a Ir remote, with two UNOs ,sounds like your trying to do more than that smiley
20  Using Arduino / General Electronics / Re: General XBee question on: April 08, 2012, 02:34:41 pm
so the second one in that pack would have to be used smiley-sad VIA serial?
21  Using Arduino / Networking, Protocols, and Devices / Re: Send/Read more variables using I2C (NEED HELP!!!) on: April 08, 2012, 01:56:41 pm
lol you can call the Drunk1 and Drunk2 for all tha it matters ,,, Just put the code the the one your reading data from as master , and the other as as slave,, but Calling the units what ever you want has nothign to do with it...... its all about the code of who is doing what.
But if you need to read all about I2C http://www.gammon.com.au/forum/?id=10945 to get enough info , here is the link and since ive already done this Road http://arduino.cc/forum/index.php/topic,98513.msg743707.html#msg743707 Good luck
22  Using Arduino / General Electronics / General XBee question on: April 08, 2012, 01:45:34 pm
Can the modules Parallax 32440-RT XBee Wireless Pack Be Connected * just the  module not the adapter boards* into the Wireless shield http://arduino.cc/en/Main/ArduinoWirelessShield, And is the second unit required or will it communicate directly your wireless network ?
23  Using Arduino / Networking, Protocols, and Devices / Re: Send/Read more variables using I2C (NEED HELP!!!) on: April 08, 2012, 01:30:59 pm
so im guessing you didnt try it ,, sence its sending 100 and 80 is that not what u wanted ?
24  Using Arduino / Networking, Protocols, and Devices / Re: Send/Read more variables using I2C (NEED HELP!!!) on: April 08, 2012, 12:52:22 pm
Code:
#include <Wire.h>

void setup()
{
  Wire.begin(2);       
  Serial.begin(9600);
Wire.onReceive(receiveEvent); // register event 
}

int a = 0;
int b = 0;

void loop()
{
}
 // Wire.requestFrom(2, 2);   
void receiveEvent(int howMany)
  //while(Wire.available())   
  {
    a=Wire.read();
    Serial.println(a);   
    b=Wire.read();
    Serial.println (b);
 delay(500);   
  }





Code:
#include <Wire.h>

void setup()
{
  Wire.begin(2);               
 // Wire.onRequest(requestEvent);
}
int x=100;
int y=80;

void loop()
{
  delay(100);



//void requestEvent()
Wire.beginTransmission(2);
  Wire.write(x);
  Wire.write(y);
 Wire.endTransmission();                     
}


Sorry i modded your code
25  Using Arduino / Networking, Protocols, and Devices / Re: Send/Read more variables using I2C (NEED HELP!!!) on: April 08, 2012, 12:18:48 pm
change your byte to int
26  Using Arduino / Networking, Protocols, and Devices / Re: Send/Read more variables using I2C (NEED HELP!!!) on: April 08, 2012, 12:04:12 pm
slave
Code:
#include <Wire.h> //starts the library
#define LED_2 11
int x = 0; // give a value to the varable to be change with I/Os
int y = 0;

void setup() {
 // Serial.begin(9600); // used to debug
  Wire.begin(2); // Start I2C Bus as a Slave (Device Number 9)
  Wire.onReceive(receiveEvent); // register event
   pinMode(LED_2, OUTPUT);
    digitalWrite(LED_2, LOW);
}

void loop ()
{
    if (x == 1) {
    digitalWrite(LED_2, HIGH);
    delay(200);
    digitalWrite(LED_2, LOW);
    delay(200);
  }
}

void receiveEvent(int howMany)
{
   x = Wire.read();    // receive byte as an integer
 y = Wire.read();    // receive byte as an integer
}


Master
Code:
#include <Wire.h> //starts the library
int INRead = A0;
int x = 0; // give a value to the varable to be change with I/Os
int y = 0;

void setup() {

  pinMode(13, OUTPUT);
  pinMode(INRead, INPUT);

  Wire.begin(1);
}
void loop(){
{
  x = analogRead(INRead);
}

  Wire.beginTransmission(2);
  Wire.write(x);

  Wire.endTransmission();
}


I just wrote this - so take it for whats its worth smiley
There is alot left out ,, youll have to add your own code from there
27  Using Arduino / Programming Questions / Re: Need help on IR remote on: April 08, 2012, 09:59:15 am
this must be some thosand or so line not to be able to do what your indicating, Is it ?
28  Using Arduino / General Electronics / Re: sensor connectors for use outside on: April 08, 2012, 09:52:43 am
agree  roncoop , even just 3 wires danging in the water at hight, but i think he said something about already having them- (didnt feel like rereading) smiley  so i went with that possable solution - Even just a POT connected to a flowing arm would have worked smiley
29  Using Arduino / General Electronics / Re: SSR load to Arduino ? on: April 08, 2012, 09:49:38 am
Cool , that one of those thing almost worth jus to have laying around, JIC type smiley
30  Using Arduino / Networking, Protocols, and Devices / Re: Send/Read more variables using I2C (NEED HELP!!!) on: April 08, 2012, 09:47:20 am
lets see your code
Pages: 1 [2] 3 4 ... 11