Connect sensors and actuators

September 6, 2013 – 11:09
Complete the EclipseCon M2M tutorial and take home some Open

In this tutorial we finally connect sensors and actuators.

Let’s start by hooking up an LED on port O0 and a potentiometer on the I0 port. The code we write works fine with every analog sensor, just remember to change the object name when you declare it.

Our starting code looks like this:

#include TKPotentiometer pot(I0); TKLed led (O0); void setup() { //nothing } void loop() { //nothing } Let’s take a look at what our sensor is reading, using the print function that we’ve seen in the previous tutorial.

val =; Serial.println(val); delay(50); The code we have so far should be something like:

#include TKPotentiometer pot(I0); TKLed led (O0); int val; void setup() { Serial.begin(9600); } void loop() { val =; Serial.println(val); delay(50); } After uploading this code into the Arduino, we are able to read the potentiometer’s values in the serial port, like we did in the previous tutorial. So far so good, but why did we connect an LED? Well we want it to be responsive to our sensor, so that its brightness changes proportionally to our sensor’s variations, can you guess what we have to write?

Do it by yourself before reading further

We just have to put the values of the potentiometer into the brightness function of the LED, that in our case are stored inside the val variable:

led.brightness(val); Write this in the loop function and upload it into the board; if you move the potentiometer you should see the LED’s brightness changing. Open the serial monitor to see the exact value.

Your browser does not support the video tag.

Final code:

#include TKPotentiometer pot(I0); TKLed led (O0); int val; void setup() { Serial.begin(9600); } void loop() { val =; led.brightness(val); Serial.println(val); delay(50); }

If you already used Arduino before, you probably noticed that the TinkerKit ouptut PWM goes on a scale from 0 to 1023 instead of the 0 to 255 that you’re used to. This is because of the TinkerKit library, that in order to simplify the process, automatically converts the value in the .brightness() method.

What it does is converting led.brightness(value) to analogWrite(ledPin, value/4).

Фотообои 3д лепнина


Not much more than a 'weak' robot ..

2013-08-20 13:01:53 by EdgingFanFT

Many of the minimum wage jobs will eventually be replaced by robots capable of doing the job more effectively, for longer periods of time, without Breaks and they will never piss and moan about the crappy pay!
.. Face it, this has already happened.
So, where are the jobs going to be in the future? Building robots to replace minimum wage workers who HONESTLY do not want to be doing that $hit job anyway. So get thee to a mechanical trades school or a place teaching Mechatronics. Servos, motors, gears, sensors, transducers and actuators is THE FUTURE!

New Growth Opportunities for Electroactive Polymers  —
The market potential is large - EAPs can be used in various applications including actuators and sensors, biomimetics and robotics, energy harvesting and storage devices etc.

U.S. Patents Awarded to Inventors in Michigan (Sept. 5)  — Targeted News Service
ALEXANDRIA, Va., Sept. 5 -- GM Global Technology Operations, Detroit, has been assigned a patent (8,527,159) developed by Steven Mark Bezdek, Haslett, Mich., for an "automatic transmission actuators and sensors having integrated electronics."

Omron Omron D5B-1013 Mechanical Touch Switch, Hemispheric Actuator, M10 Size, 3m Cable Length
BISS (Omron)
  • Detects object contact from multiple directions and operates even with a slight force.
  • Slow action switching mechanism used. Movement differential as small as 0.01mm assures high accuracy of detection.
  • Gold plated contact with coil spring capable of switching micro current/voltage load while providing high contact reliability.
  • High resitant to dust, fine particles and water or oil splash, conforming to IP67.
  • Three size (M10, M8, and M5) and three types of actuators (hemispheric, cone shaped, and wobble stick).
Conbraco Industries Apollo 77-100 Series Bronze Ball Valve with Actuator Mounting Pad, Two Piece, Inline, Lever, 1/4" NPT Female
BISS (Conbraco Industries)
  • Made of bronze for higher strength and corrosion resistance than brass
  • Actuator mounting pad for automating the valve
  • Full port flow for higher operating efficiency than standard port
  • Pounds per square inch (gauge) (psig) rating of 600 for water, oil, and gas (WOG) and 150 for saturated steam
  • Female National Pipe Taper (NPT) threads for use with male threaded pipes
UFlex PowerA Electro-Mechanical Actuator
Sports (UFlex USA)

Related posts:

  1. Actuator Sensor Interface
  2. Actuator sensor interface protocol
  3. Actuators sensors interface Wiki