Show Posts
Pages: [1]
1  Using Arduino / Installation & Troubleshooting / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 on: April 19, 2012, 02:53:04 am
I seem to have the same problem.
Specific with windows7-32 bit pc.
I allready did try the 0022 software version
I did click on the Uno version in "board".
I did check the monitor (shows only com1)
In system/device manager: there is never anything at all under this port while the uno is connected.
The flip software from atmel i did try and was not the right version or..... i don't know

Also is their (atmel) high speed hot helpline very dead!!!
2  Using Arduino / General Electronics / Re: Batteries, howto make a board that can run a year? on: May 27, 2011, 02:52:00 am
I did read your topic just now.
But to me it don't seem to be necessary to search for extreme small power consumption.
I am currently working (also in spare time) on a batterieloader for reloadbatteries, based on arduino.
The purpose is to disconnect from power supply (in my case 230 ac) if the load is complete via a optocoupler.
But in your case i would work with solar power (a small surface should do) and reload batterypack (4x 1.2 volt cells do very well for this purpose).
How it would best work in case of solar power supply : that needs some work out, because i also had some problems with to make it all go smooth.
But mainly i think a combination of the solar cell + a constant current source toward the batterypack should do.
In this way it must be possible to build easily a device that works even over a year or even two and weighs less than  1 kg.
3  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: badly defined output? on: July 15, 2010, 05:02:36 am
Thanks for  explaining the = == mather. and the explaining of the defining of pinMode .
In the meanwhile i had discovered that when i take the definition of the inputs out of my scode, my stuff works.
4  Forum 2005-2010 (read only) / Bugs & Suggestions / badly defined output? on: July 15, 2010, 03:50:53 am
I am an absolute beginner with arduino duemilanova.
For exercise i created a sketch to run a steppermotor.
I did it on purpose in a strange way by writing a very simple wave going to  an array of 4 outputs.
Using an uln2003a driver, the thing works.
The motor is attached to a potentiometer (5 turns) which returns the position of the motor.
A second identical potentiometer i can change position.
The motor searches now the same position.
Quote
 int sensorPin1=0;
 int sensorPin2=1;
void setup(){
  //initialize pins for output
for (int thisPin=2;thisPin<6; thisPin++)
pinMode(thisPin,OUTPUT);
pinMode(sensorPin1,INPUT);
pinMode(sensorPin2,INPUT);


void loop (){
  int val=analogRead(0);
  int var=analogRead(1);
 if (val<var-50)//motor forward "to" var
 {//forward loop
 digitalWrite(2,HIGH);
 delay(50);
 digitalWrite(2,LOW);
  digitalWrite(3,HIGH);
 delay(50);
 digitalWrite(3,LOW);
  digitalWrite(4,HIGH);
 delay(50);
 digitalWrite(4,LOW);
  digitalWrite(5,HIGH);
 delay(50);
 digitalWrite(5,LOW);
  }
 if (val>var+50)//reverse going
 {digitalWrite(5,HIGH);
 delay(50);
 digitalWrite(5,LOW);
  digitalWrite(4,HIGH);
 delay(50);
 digitalWrite(4,LOW);
  digitalWrite(3,HIGH);
 delay(50);
 digitalWrite(3,LOW);
  digitalWrite(2,HIGH);
 delay(50);
 digitalWrite(2,LOW);
  }
 if (val=var)//must stop
 {
 digitalWrite(2,LOW);
 digitalWrite(3,LOW);
digitalWrite(4,LOW);
 digitalWrite(5,LOW);
 }
}

This stuff works, but not if sensorpins are 1 and 2 instead of 0 and 1.
If i define them as 1 and 2, the !output! number 2 works if nothing is connected(no load at all) 0/5volts.
But if it drives a led or even simply informs the uln2003 input, it gives no more than 1,5volts (off course to little).

Question: Should i do defining in another way, because it should be possible to use inputs with the same id than the outputs.

ps: i know that the idea of running a steppermotor with this kind of sketch is unusual and not prferable, but it is only a way of learning to see if things work out.
Pages: [1]