Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Microcontrollers / Re: programming ATtiny, BB Arduino with manual reset on: June 09, 2014, 02:50:53 pm
Solved, THANKS.
2  International / Español / Re: WINDOWS 8.1 - Este dispositivo no puede iniciar. (Código 10) on: June 03, 2014, 02:19:43 pm
 COMMPORT aparece el No del puerto serial XX .
XX es el numero que debes escoger en TOOLS-COMM PORT en ARDUINO.
Si estas usando un cable PL2303, te falta el driver.
3  Using Arduino / Microcontrollers / programming ATtiny, BB Arduino with manual reset on: June 02, 2014, 06:14:59 pm
Hi Folks; I have a standalone 328 to USB via PL2303 without DTR.
I can upload sketches to a bootloaded 328 without issues;  well just one, which really doesn´t worry me:
I can hit upload without manual reset, UPLOADING...., seems to hang, I wait a few seconds,
hit manual reset, DONE UPLOADING: No error message, and it runs my sketches.
Problem is 328 is overkill  for my present needs; an ATtiny suffices.
Can I upload with this setup?
4  Using Arduino / Programming Questions / Re: Help with millis!!!! on: March 12, 2013, 09:02:32 pm
Don´t know if I´m going in the right direction but I´m into interrupts; if there´s something easier I´d appreciate you let me know. I only need one flag; when that switch actuates, count 5s.
then " do that ".I´m working on it, just need directives, thanks.
5  Using Arduino / Programming Questions / Re: Help with millis!!!! on: March 12, 2013, 05:57:15 pm

Code that has had Tools + Auto Format run on it is easier to read.
Almost sure I did that.
Code that consistently uses { and } after an if statement is easier to understand.
Does this mean that I should ALWAYS use curly braces with IF statements?
I´ve noticed that the code changes if I include or delete them.
How ARE the switches wired?
I´m more comfortable with positive digital electronics; pullup resistors,no problem.
Take a look a FSM's in the playground.
Hope I find it; don´t know what that means.
the code might actually work like that if you moved the "openedtime = millis();  // when did it open"outside of the if and into the else branch. 
Tried that a thousand times.
currenttime will always be just less than openedtime because you are always resetting openedTime.
Is it an error to assign both currenttime and openedtime = millis?
Should I take openedtime outof the main loop? Maybe call a function?
Is setting a flag the only way to solve this?
6  Using Arduino / Programming Questions / Help with millis!!!! on: March 12, 2013, 02:07:40 pm
Hi, everybody. Millis is driving me crazier ( or maybe those curly braces? )
What I´m trying to do is start a timer when a swith comes in, wait a certain time and then " do that ".I googled millis,found tronicstuff, John Boxall and quite a few threads on the forum; can´t understand.
If I change a few things it LED" won´t go ON, or won´t go OFF or go ON immediately.
Just need explanation,not solution; Thanks.
Here´s my code:

int startPin = 2;
int LED1Pin = 3;
int openedPin = 4;
int LED2Pin = 5;
int closedPin = 6;
unsigned long openedtime;  // when did switch go HIGH?
unsigned long opentime;  // time delay
unsigned long currenttime; 

void setup( )
  pinMode ( startPin, INPUT  ); 
  pinMode ( LED1Pin, OUTPUT  ); 
  pinMode ( openedPin, INPUT ); 
  pinMode ( LED2Pin, OUTPUT  );
  pinMode ( closedPin, INPUT );

void loop ( )
  currenttime = millis ( );
  if ( digitalRead ( startPin ) == HIGH )
    digitalWrite ( LED1Pin, HIGH );
  if ( digitalRead ( openedPin ) == HIGH )

    digitalWrite ( LED1Pin, LOW );
    openedtime = millis();  // when did it open
    opentime = currenttime - openedtime;
  if ( (opentime) >= 5000 )
    digitalWrite ( LED2Pin, HIGH );  // turn LED2 ON
    if ( digitalRead ( closedPin ) == HIGH )
      digitalWrite ( LED2Pin, LOW );

7  Using Arduino / Programming Questions / Re: Day/Night LDR sensing code. What is the correct approach to sampling day/night. on: March 10, 2013, 11:07:37 am
Hi, Khilid; I appreciate your sincerity " Simply... You can´t afford me " smiley-grin
8  Using Arduino / Programming Questions / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 on: March 10, 2013, 09:32:06 am
almost every time I get this error it's because I have a fried the IC (atmega 328p)

Hi treebykooba, HOW do you manage this? You are obviously making BAD/WRONG connections. They don´t get fried just by themselves so take some care and save some money.
9  Using Arduino / Programming Questions / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 on: March 09, 2013, 12:26:34 pm
Hi Vikirobot, if your Arduino doesn´t show up under PORTs in device manager, then you most likely didn´t install the drivers correctly.

Unplug your UNO, open PORTS ( COM & LPT ).
When you plug your UNO you should hear the WINDOWS tone, NEW HARDWARE FOUND and you should see your UNO as an USB device.

The WINDOWS installer opens;
Check “ NO “, then NEXT
Check “ LOOK FOR “, check INCLUDE, click “ EXAMINE “
Click on “ drivers “, DON¨T open the folder.
Click on “ drivers “ AGAIN and “ ACCEPT “
Click on  “ NEXT “
WINDOWS will look for, find and install the drivers
Click “ FINISH “and your UNO will show as “ Arduino UNO R3 ( COM X ); X is your port number.

Now open ARDUINO IDE by double clicking on the ICON, select “ TOOLS “,
Verify that your “ BOARD “ is listed as UNO and that your “ SERIAL PORT “ is checked as COM X.
Now you´reready to suffer a bit, but it´s worth the pain.  smiley
10  Using Arduino / Programming Questions / Re: Nested If/Else on: February 20, 2013, 08:43:43 pm
Hi, RF< what they want to say is; write your code so you can see your braces at the beginning of the NEXT line. If you place your cursor just right ( not LEFT of the braces  you´ll see the corresponding RIGHT one ).
If you have 3 left braces in your sketch you HAVE TO have 3 right braces, ALSO.
That´s why you could have “  too MANY right curly braces”  OR  “ too FEW left curly braces “
Count yours and try writing your code like this:

If X
 If Y
      do D
      do C
do B
   do A
11  Using Arduino / Installation & Troubleshooting / Re: Not sure what's wrong.. [solved] on: February 20, 2013, 07:31:02 pm
You DON´T have to but it´s very decent practice; if you´don´t you most likely WILL regret it.
12  Using Arduino / Installation & Troubleshooting / Re: My ORIGINAL UNO r3 got converted to a Mega 1280!!! on: February 20, 2013, 07:24:37 pm
I know WHY and understand the grandchildren part but I CAN´T find a MODIFY button anywhere.
13  Using Arduino / Microcontrollers / Re: Possible to use Arduino without board? on: February 20, 2013, 07:05:32 pm
Once you have uploaded your sketch you can place the uP in another circuit ( EMBED ); as soon as you power the circuit the code starts running.
14  Using Arduino / Programming Questions / Re: While Loop on: February 20, 2013, 02:03:42 am
It  seem s you  want  to control something. Why not try

If (  digitalRead ( sensorval) == HIGH )
digitalWrite ( motorpin , LOW );
digitalWrite  ( motorpin, HIGH );

Never the less, NIck Gammon is expert; post your code.
BTW, take some advice as I was given: go to TOOLS and select AUTOFORMAT, place your parenthesis at the beginning of the next line,
15  Using Arduino / Programming Questions / Re: switches and arduino on: February 20, 2013, 01:23:34 am
Hi;  Hazzarded? Mind smiley, just need a link to read three switches on one pin; I understand the electric circuirt but as I´m new to ARDUINO readAnolog example in reference in vague. Can you help with two switches? leave the other as homework? thanks.
Pages: [1] 2 3 ... 6