background preloader

Arduino

Facebook Twitter

Processing

Information about Servo. X memthis is some instructions from your post:" if ( Serial.available()) { char ch = Serial.read(); if(ch >= '0' && ch <= '9') // is ch a number?

Information about Servo

Val = val * 10 + ch - '0'; // yes, accumulate the value else if(ch == '-') // is this the minus sign? { angle = angle - val; if(angle < 0) angle = 0; myServo.write(angle); // write the new angle val = 0; } else if(ch == '+') // is this the plus sign? { angle = angle + val; if(angle > 180) angle = 180; myServo.write(angle); // write the new angle val = 0; } }"if I write "90+" the program enter in the loop three times, the first to read the character "9", the second to read the character "0" and convert "9" like "90", and the last lo read the character "+" that is, in this example, like a character of the end of the line (such as for example "\n" in C)I would like to know if there is a method that can read the number (for example "90") in a single operation.

Audio

Triggering a Camera’s Flash with Sound and Light. Update: Check out my latest Camera Axe project for a much more robust device that handles this or my store where I sell the Camera Axe.

Triggering a Camera’s Flash with Sound and Light

For those just wanting to see the pretty pictures, click here. This article focuses on making the sensors used to trigger a camera’s flash using a microphone or a cheap laser pointer. Since I’ve already described how to do the actual firing of a camera’s flash here I won’t focus on that part of this project today. Powering 3 computer fans in series: options?