Show Posts
|
|
Pages: 1 2 3 [4]
|
|
46
|
Using Arduino / Programming Questions / Re: gobetwino - open office
|
on: May 24, 2011, 05:14:35 am
|
|
I'll try as soon as possible to give the code.
And I'm NOT just coming to complain! I just thought it was a general problem and not specified in a rule of code.
@Rob Is it possible to discuss this problem in Dutch out of this forum? (I see youre Netherlands) Dat praat voor mij wat handiger...
Gr. Johan
|
|
|
|
|
47
|
Using Arduino / Programming Questions / gobetwino - open office
|
on: May 23, 2011, 04:28:49 am
|
|
Hi,
I'll try to put data in Open Office (Ccalc) with gobetwino. But only the first row will be filled.
So, i think, there is a right connection but something in gobetwino or arduino is set wrong...
I read another topic about this, but that wasn't a solution.
Gr. Johan
|
|
|
|
|
48
|
Using Arduino / Programming Questions / Re: While loop don't stop
|
on: May 13, 2011, 08:04:03 am
|
|
I will thank you all for answering and debugging me.
The first part of my project works!
Take a random sensor. With potentiometer 1 you set the sample frequentie. With potentiometer 2 you set the number of samples. With the button you start sampling and put it in a column in Excel.
Now we must edit Excel to take a usefull graph of the data.
It seems to be very usefull for simply temperature, light, humidity measurements for our young students at school. At higher classes they could edit the C-code.
But also is it very usefull for our exchange with a school in Macha (Zambia). There the people don't have the possibility to buy a expensive measuresystem. So this low-budget (< € 40) looks helpfull.
If there is anyone interested in this (little) project, contact me.
Thanks a lot!
Gr. Johan
|
|
|
|
|
51
|
Using Arduino / Programming Questions / Re: While loop don't stop
|
on: May 13, 2011, 06:42:50 am
|
I never turns the led off. It must be put ON!  In the first two rules of the function meet() I've digitalWrite (ledPin, HIGH). Then a delay of 1000. So, i think, the led turns on for a second. But programming is seems to be difficult for me...  PS copying the code to this forum is a lot of work. I programmed on a standalone laptop, without any network/internet connection. So I have to copy my code in a txt, put it on a stick, go to anonther computer with internetconnection etc. etc. O, o, happy schoolnetwork...
|
|
|
|
|
52
|
Using Arduino / Programming Questions / Re: While loop don't stop
|
on: May 13, 2011, 06:23:11 am
|
|
Thanks. It works.
But another problem:
The led don't go on for a second. And also the outputValue (which is linked at the delaytime of sampling) is not going to 100. But when I removed both rules (digitalWrite and delay(1000)) the sampling time is correct. So there is a conflict. I will during the sample, so long as the button is pressed turn on the led. Second experiment is a startbutton and a stopbutton.
Idea?
|
|
|
|
|
53
|
Using Arduino / Programming Questions / While loop don't stop
|
on: May 13, 2011, 05:49:08 am
|
|
I'm back...
This is my code:
int outputValue = 0; int ledPin = 7; //led says when sampling starts int button = 2; //button to start sampling
void setup() { Serial.begin(9600); Serial.println("CLEARDATA"); }
void loop() { int meten = digitalRead(button); //looks at button: low or high
// while button is push, function meet() is called.
while (meten == HIGH) { meet(); } } void meet() { digitalWrite (ledPin, HIGH); //turns on the led for a second delay(1000); int sensorValue0 = analogRead(A0); //read analog 0 int sensorValue1 = analogRead(A1); //read analog 1 outputValue = map (sensorValue1, 0, 1023, 100, 2000); //converts analog1 to values between 100-2000 // send to serial (macro in excel)
Serial.print("DATA, ,");
Serial.println (sensorValue0); delay(sensorValue1); }
When I push the button, ' meten' is high. And it starts to sample the SensorValues to Excel (with PLX-DAQ). It works! Fine! But when I left the button, i think 'meten' is low and there is no call to void meet() and there is no sample of values. Not so. The sample goes on. Neither turn on the LED, in the first rule of meet().
What happened?
|
|
|
|
|
56
|
Using Arduino / Programming Questions / Re: edit sketch
|
on: May 12, 2011, 08:18:30 am
|
Thanks for answering. This is my little code: void setup(){ Serial.begin(9600); Serial.println("CLEARDATA") } void loop() { int sensorvalue = analogRead(0) //potmeter at analog input 0 Serial.print("DATA, ,"); Serial.println(sensorvalue); delay (500); } Upload in Arduino. Now I start PLX-DAQ, the Excel Macro, and 'connect' ( http://www.parallax.com/tabid/393/Default.aspx). Data comes up in Excel, row after row, each 500 ms. This PLX-DAQ uses COM1. But when I will change with SerialMonitor it uses COM1 too. And thats not possible, I mean. And how will the sketch know when a serial command comes in and wherefor it is? @Si, Is 'delayPeriod' the same as 'delay'? Sorry, i'm a very newbee Gr. Johan
|
|
|
|
|
57
|
Using Arduino / Programming Questions / edit sketch
|
on: May 12, 2011, 06:04:51 am
|
Hi, I'm new here. And I'm very enthusiastic about Arduino. Low price, huge opportunities. I use Arduino at this moment to get one or more analog values in MSExcel (with PLX-DAQ). In the sketch I set the samplefrequency (=delay) at p.e. 500, a half second. So, in Excel comes the data each half second. But when I will change this frequency, I have to open the sketch, change te right thing, upload, and back to excel. Is there any solution to do this special thing (change delay time) without typing in the sketch? Perhaps in a small form with a input field and an upload-button, out of the whole program. (In future I will pupils (12-14 years) let work with this. But they don't have to understand the C-code. They only have to change the frequency of the sample.) Next step is: change sample-time. But thats an Excel question, I think. Greetings, Johan TOA Natuurkunde Calvijn College Goes ( www.calvijncollege.nl) The Netherlands
|
|
|
|
|