Show Posts
Pages: 1 ... 24 25 [26] 27 28 ... 104
376  Using Arduino / Programming Questions / Re: Please help me in programing problem!!! on: May 12, 2014, 11:47:14 pm
So I trying to control relay remotely (433mhz)  with a button that when I pressed the button the relay open (send the code word) and when  I stop the push of a button (send again codeword just once) then close relay.

Well, the program always sanding the code.
void loop(){
   buttonState = digitalRead(buttonPin);
 // if the pushbutton is pressed
Where's the code that determines that? You have an else without an if.
377  Using Arduino / Programming Questions / Re: How to get last sunday of month on: May 12, 2014, 11:33:09 pm
I don't know what the rule is in Spain, but in the UK the time changes at 2:00 AM GMT in March and 3:00 AM BST (= 2:00AM GMT) in October.
378  Using Arduino / Programming Questions / Re: RTC programming (DS1370) on: May 12, 2014, 11:20:58 pm
This seems wrong:
if ((hh<hour_max_mor)&&(hh>hour_min_mor)&&(val==1))//verify is it morning
    analogWrite(LEDPin, brightness); //turn on LED with PWM
If it's morning, you want to turn it off, not on. Try:
if ((hh<hour_max_mor)&&(hh>hour_min_mor)&&(val==1))//verify is it morning
    analogWrite(LEDPin, 0); //turn off LED
379  Using Arduino / Programming Questions / Re: if looping in parsing string data on: May 12, 2014, 11:07:40 pm
if (result== "3"){
380  Using Arduino / Project Guidance / Re: Time lapse slider program on: May 12, 2014, 10:59:55 pm

I will introduce myself first as i myself get annoyed with others that just ask a question and 'run'.

Firstly my name is Ben Bryden, profession: Cad/Cam engineer. I'm currently under taking a time lapse slider project for a 70d dslr camera, being purely mechanical i have next to no knowledge of electronics or programming these boards, hence this question.

I'm using a Arduino Uno - R3 board with RGB lcd shield kit.

I would appreciate if anyone had a program already written that i can use to generate the 'shoot - move - shoot' for perfect time lapse.

 I.e. change the input variables that are displayed on lcd shield that controls the time the motor runs then a time delayed pause then trigger the camera shutter then run the motor again for the next move and repeat, so on.

If anyone would be some kind to answer this question it would be a major help, thanks.
How is the camera shutter triggered? Mechanically or electronically?
381  Using Arduino / Project Guidance / Re: Noob help please - control circuit (timed) on: May 12, 2014, 10:46:41 pm
First things first - I'm based in the UK, does anyone have any great resources where I can learn to program sketches for simple control projects?
Whereabouts? There are several Meetup groups and Hackspaces in the UK that have an Arduino interest that would welcome you.
I should be able to pick things up easily enough - as a kid I spent many happy hours programming my old 8-bit spectrum, admittedly it was BASIC (and Sinclairs version!) so I hope it should be ok.
Once you've done programming in one language, picking up another language is fairly easy, as the principle is the same, even if the syntax is different. I too started with Sinclair BASIC, taught myself Z80 assembler on the Spectum and wrote a program (Electrodraw) that I was selling.
What would be a good starter kit to get so I can start messing about with things?
I started with a Sparkfun kit that was bought from, based in the UK. (Disclaimer: I've not tried other kits, but I hear that most are equally good) Avoid Maplins, as they are expensive.
382  Using Arduino / Project Guidance / Re: GoKart timing system on: May 12, 2014, 10:08:47 pm
:-( could not find anything that could lead to a "unique" IR signal ... for multiple objects ...

does not have to be IR but I dont know any better smiley-sad

any thoughts?
At the point you want to detect them, how wide is your track (in cart widths)? Could there ever be 3 carts passing the detection point at once? If not more than 2, you could transmit an IR beam from both sides of the carts to both sides of the track. Even if two are passing the detectors at the same time they couldn't block each other's signals.
383  Community / Bar Sport / Re: Post your code on: May 11, 2014, 11:22:39 pm
That bad ?  smiley-grin
384  Using Arduino / Programming Questions / Re: Code line interpretation HELP on: May 11, 2014, 10:41:45 pm
That is, of course, assuming the OP has measured the wheel in inches.  If they have the size of the wheel in cm, then the values will be different.  Simpler then to convert to km/h as they're the same kind of unit.

RPM * circumference (in cm) = cm/m.  Multiply by 60 for cm/h.  Divide by 100,000 for km/h.  Multiply by 1.609344 to convert km/h into mph.
Agreed. As the OP has given no location in his ID, I had assumed (maybe wrongly) he's in the US or UK. I do wish that people would give some sort of location in their ID. A country would be nice, a town or city would be even better.
385  Using Arduino / Programming Questions / Re: Arduino Uno - Deadtime between PWM (ATMega328) on: May 11, 2014, 10:28:46 pm
I am working on PWM code (varying duty cycles) in which I used a Sine wave lookup table.
The code I have is based off of this site:

I use timer two and the OC2B and OC2A registers (pin 3 and 11). Both pins generate the same output except one is an inverted output.
OCR2A=pgm_read_byte_near(sine256 + icnt_a); 
  //Read value from sine table and send to PWM DAC
  // (ORCR2A will be non inverted PWM)
  OCR2B=pgm_read_byte_near(sine256 + icnt_a);  //ORCR2B will be inverted PWM
How? You're giving them both the same value. You appear to be missing a "!"
386  Using Arduino / Project Guidance / Re: Starting Das Blinken Project need help with mini FET wiring on: May 11, 2014, 09:48:40 pm
Thanks for your help. I changed the baud rate on the seriel monitor and now I am getting correct readings.  Still having trouble troubleshooting everything else though.   I know the arduino and accelerometer are working 100% now.  They only thing left is the mini FET, wiring,  and the LEDs.
Slowly, slowly catchee monkey.   smiley
387  Community / Bar Sport / Re: Post your code on: May 11, 2014, 12:38:01 am
I only just came across this thread. Good job Mike. Although there are a few "knockers" I do not see anybody else plugging in their cardoid to show us how it'd done  smiley-grin Come on step up to the plate fellas. I'll make it easy here is a backing track on YouTube
If I 'sing', the whole forum will be closed down!
388  Community / Bar Sport / Re: Idiotic Table - A periodic table for idiots on: May 11, 2014, 12:29:54 am

Chupacabra but no Jackalope?  I am terribly disappointed.

Oh wait.  I guess the Jackalope is real...
But where's the Crockoduck?
389  Using Arduino / Programming Questions / Re: Code line interpretation HELP on: May 10, 2014, 11:40:23 pm
And if possible, can someone show me a way to improve the code in order to switch the display from rpm's to km/h ?
Speed = RPM * wheel circumference or speed = RPM * Pi * wheel diameter. That will give you inches/minute, which can easily be converted into MPH.
Divide by inches in a mile (63360) and multiply by minutes in an hour (60) or just divide by 1056 (60/63360 = 1/1056)
390  Using Arduino / Project Guidance / Re: how to send Alert and avoid doing it second time (loop)? on: May 10, 2014, 10:55:26 pm
You have to set threshold as the number of milliseconds you want to delay sending the second SMS. You've set it as 0, so there won't be any delay! I suggest you set it to 10,000 to give a 10 second delay.
Pages: 1 ... 24 25 [26] 27 28 ... 104