New project

8 Mar

Hey,

We’ve completely finished the sorting machine and we’ve also shown it at a sort of expo we had at school a few days back. It didn’t completely work then (just our luck) but that was because we had another project on the same arduino board and in the code we had both those machines on the same pin, and of course that doesn’t work. Now we’re slowly working our way to a car (sort of) that evades obstacles using an infrared sensor. For that to work properly we need to use a relais and a condensator, both of which we don’t know how to use yet, so we’re now just trying to figure out how to work with them. We sort of know how the condensator works, it worked before but now it doesn’t anymore, so we’re going to keep trying.

So that’s basically what we did in about an hour, I hope you learned something.

Joeri Zwamborn

Advertisements

Here’s the code

22 Feb

Hey, I forgot to copy the code in my last post, so here it is.

#include <Servo.h>
Servo servo;   
int pos = 0;
int fsrPin = 0;
int fsrWaarde;
 void setup(void) {
   servo.attach(9);
  Serial.begin(9600);    
}
 void loop(void) {
  fsrWaarde = analogRead(0);  
 Serial.print(“Analoge waarde = “);
 Serial.print(fsrWaarde);
    if (fsrWaarde < 10) {
    Serial.println(” -leeg”);
     pos=90;
     servo.write(pos);
  } else if (fsrWaarde < 200) {
    Serial.println(” – Licht”);
     pos=45;
     servo.write(pos);
  } else if (fsrWaarde < 500) {
    Serial.println(” – Zwaar”);
     pos=130;
     servo.write(pos);
  } else if (fsrWaarde >= 500) {
    Serial.println(” – te zwaar”);
     pos=90;
     servo.write(pos);
  }
  delay(1000);
}

Hope it helps.

Problems

1 Feb

So we’re (already) encountering some problems, which is irritating considering we started literally an hour ago. We’re using school’s laptops, meaning we’re both using a 20-year-old Asus. We can’t get Processing to run, neither on Linux nor on Windows, and the problem with Windows is that we don’t have the rights to install it (since we’re using school’s laptops). I tried to post this before, but the laptop crashed on me (apparently the battery was dead, even though it didn’t warn me) and I had to write it again. The good news is that we do know what we’re going to do once we get it up and running. We’re going to make two relatively simply programs, which we’re going to use to change a led’s brightness using the mouse. One of the two (the Processing program) will serve the purpose of converting the mouse’s X-coordinate into an electrical signal, which it will then send to the other program (the Arduino one) and this one will send the signal to the board and actually physically change the brightness of the led.

Leave your educated comments below and stay tuned, more updates Friday.

Hullo WordPress

1 Feb

I’m the other guy behind this blog, and me and my friend will be posting a few (or maybe more than a few) updates on our progress using Processing and Arduino to draw some stuff and such. We do have some experience with Arduino, but Processing is completely new to us, even though it is (so we have heard) a lot like the Arduino language. Be warned though, this is not a blog for people just starting with programming, or even people just starting with Arduino. I’m not saying we’re experts on programming (we’re both 16 years old) but, as said earlier, we do have some experience.

We hope you all like it, leave some educated comments below and stay tuned.