Go Down

Topic: An LDR and servo motor controlled entertainment unit (Read 1 time) previous topic - next topic


What this is supposed to be:
An LDR and servo motor controlled artifact used in a easygoing manner to induce laughter and what not.
This was made as a sort of "gag" project for our teacher David Cuartielles the co-creator of Arduino. 

What he didn't tell us that week was that we had an additional 7 days after to showcase it via different mediums for the chance of winning different prizes.

So this week our whole class is preparing different types of "marketing schemes" to basically get as much viewers as possible (the ones with the most wins).

That's why we made this video showcasing our 1-week project.

This is the some of the code for making the head respond accordingly to the LDR sensor:

Code: [Select]

if (millis() - timer2 > 20) {
    if (LDRReading > 896) {   

      // first check the position, increase it and correct direction
      pos = pos + dir*inc;

      // correct to decrease
      if(pos >= 180) {
        pos = 180;
        dir = -1;

      // correct to increase
      if(pos <= 0) {
        pos = 0;
        dir = 1;

      // move the head   

    timer2 = millis();

I've added the source files for those who are interested.

Thank you for reading and watching!

Go Up