Pages: 1 2 [3] 4 5 ... 10
 on: Today at 08:13:08 am 
Started by kreativ - Last post by kreativ
Hi, here is my idea.

unsigned long duration;
unsigned long startTime;
byte trigger = 0;

void loop()
  if( digitalRead(yourPin) == HIGH && trigger == 0 )
    startTime = micros();
    trigger = 1;
  else if( digitalRead(yourPin) == LOW && trigger == 1 )
    duration = micros() - startTime; //result in microseconds
    trigger = 0;

Thanks for your response. Please could you add some explanation of the codes.
Besides I'm also considering the possibility of using an interrupt. Could you also give me some help in that regard.

Another problem is that this signal may tend to fluctuate a bit but I want the time to run uninterrupted till the signal ends.

 on: Today at 08:12:22 am 
Started by aldoin - Last post by alex16
Interesserebbe anche a me.
Ma non ho capito bene come và connesso. Io ho una serie di lampade in giardino comandate da due punti. Penso che siano deviatori.
Quello che voglio fare é aggiungere un comando a distanza collegato ad arduino+GSM.
Mi sembra di capire che dovrei scollegare un deviatore e connetterlo allo scatolino ricevente, così funzionerebbe sia in manuale che a distanza
Ho capito bene ?
Ma sopratutto quanto può costare ?

 on: Today at 08:12:08 am 
Started by Squonk42 - Last post by Jantje
The choice of having a module with headers is not the best choice IMHO. A board with either a Gainstrong GS-Oolite or a Carambola 2 castellated module would have been a much better choice: smaller, more integrated and CE/FCC/RoHS certified...

Check these ones::
My lack of electronics makes I do not understand your comment.
If I look at the links I see the following:
The first is a shield which has been coming for a couple of months now.
The second has nothing to do with a dual core solution (real time + unix)
I don't know what Carambola 2 and Gainstrong GS-Oolite are.

Best regards

 on: Today at 08:11:21 am 
Started by kickula - Last post by kickula
There is a lot more to it. Just like TV remotes, they are not all the same. Parallax Link:

Thanks for the link!
So it's not only the frequency to take into account, but also the information encoded in the signal. This is called multiflexing, right? I get that this requires some more skill regarding programming and possibly some different parts as well, but it should be possible as long as I know what kind of signal the tags respond to, shouldn't it?

 on: Today at 08:11:14 am 
Started by maxiedaniels - Last post by Grumpy_Mike
what's the easiest way to detect how *long* a path of circuit is?
There is no easy way to do this. All the ways are hard.

Basically, if I wanted to put wire on, say, Jenga blocks, and then be able to tell how many jenga blocks are ontop of eachother, what would be a solution?
There would be no solution that you could do with an Arduino.
The best way is with time domain reflectometry:-
But not with a Uno. you can't.

 on: Today at 08:10:01 am 
Started by wm0104 - Last post by BulldogLowell
you may need to invert the logic, depending on your sensor logic.

try debugging by adding Serial.print() functions throughout.

const int sensorPin = 2;     // the number of the sensor pin
const int motorPin =  13;      // the number of the motor pin
unsigned long startTime;
int oldState;
void setup()
  pinMode(motorPin, OUTPUT);     
  pinMode(sensorPin, INPUT);     
void loop()
  int sensorState = digitalRead(sensorPin);
  if (sensorState == LOW) //inverted
    if (oldState == HIGH)
      Serial.println("Button Pushed");
      digitalWrite(motorPin, HIGH);   // turns the motor on
      startTime = millis();
  oldState = sensorState;
  if (digitalRead(motorPin == HIGH))
    if (millis() - startTime >= 5000UL)
      Serial.println("Timer Expired");
      digitalWrite(motorPin, LOW);

see what happens.  try to notice if the action happens when the ball breaks the beam or makes the beam on its absence...

 on: Today at 08:09:14 am 
Started by idophir - Last post by johnwasser
Will I then be able to send right/left keyboard strokes that will affect whichever application that is active at that time?

No.  You will be able to read from the Bluetooth Mate as if it were a serial port.  You would have to write a program for the PC that would translate whatever serial messages are received from that serial port into keystrokes.

The Arduino Leonardo and other ATmega32u4-based Arduinos can emulate a keyboard if directly attached to the PC via USB.

 on: Today at 08:08:54 am 
Started by scott1988 - Last post by scott1988
Hi everyone,

Does anyone have any experience programming these bluetooth modules?
I'm using the bluetooth bee hc05 with xbee pro v03 shield.

I can't seem to get mine into AT mode. I can connect it to my pc and run code off it. For example the turn LED on/off when a 1 or 0 is sent works fine but I need to change the bluetooth bee to be in master mode but everything I have tried doesn't seem to work.
I've tried setting all kinds of pins to high after reading you need to set the key pin to high but doesn;t seem to do anything.

starting to think I should of just bought proper xbees...

but any help will be greatly appreciated



 on: Today at 08:07:29 am 
Started by pighixxx - Last post by pighixxx
New version!
Download here:

 on: Today at 08:06:14 am 
Started by maxiedaniels - Last post by Graynomad
Let's assume for now we don't have blocks that are several metres in height each smiley

Are we talking the normal stack where there can be different numbers of blocks per level? If so weight won't work and I can't see any way it can work.

Or is this some different application?


Pages: 1 2 [3] 4 5 ... 10