Arduino

Supersimpele sensor: de fader

Monday, November 25, 2013
Supersimpele sensor: de faderLike0

Ik ben een sound designer, dus voor mij is het een ‘fader’, deze “Slider 60 Analog Slide Position Sensor” van DF Robots.

Ik ben gewend om nogal wat te moeten zwoegen om sensoren en dergelijke aan de praat te krijgen, maar dit was echt letterlijk aansluiten en gaan.

Hier staat alles duidelijk beschreven, inclusief aansluitschema:

http://www.dfrobot.com/wiki/index.php?title=Analog_Slide_Position_Sensor_%28SKU:_DFR0053%29

Stekkertje erin, drie draadjes in 5v (rood), grnd (zwart) en signal (blauw) en je kunt deze sketch uploaden. Dan werkt het meteen.

// # Editor     : Lauren from DFRobot
// # Date       : 30.12.2011
// #
// # Editor     : Lauren from DFRobot
// # Date       : 17.01.2012
// # Product name: Rotation Sensor v1/v2 or Analog Slide Position Sensor
// # Product SKU : DFR0054/DFR0058/DFR0053
// # Version     : 1.0
// # Description:
// # the sample to drive some analog sensors
// # Connection:
// #        Signal output pin  -> Analog pin 0
// #
void setup()
{
  Serial.begin(9600);     //Set serial baud rate to 9600 bps
}
void loop()
{
  int val;
  val=analogRead(0);      //Read slider value from analog 0
  Serial.println(val,DEC);//Print the value to serial port
  delay(100);
}

 

0

Leave a Reply

Your email address will not be published.

Follow @ Guerrilla Games
  • 🎨 Aloy by @lolinharts

#fanartfriday #fanart #horizonzerodawn #aloy
  • Happy holidays and all the best for 2019 from everyone at Guerrilla!

art by www.lizzywanders.com
animation by @kevin_middelbos ❄❄❄
  • 🌿 Stunning cosplay! 
Aloy cosplay by @daisy_cosplay
Photography by @kevinjeukens

#horizonzerodawn #cosplay #horizoncosplay #aloy #aloycosplay #norabrave
  • 🏹🏹🏹 – Fan art by @cartumante

#horizonzerodawn #fanart
  • 🎨 Aloy by @crisurdiales

#fanartfriday #horizonzerodawn #aloy
  • Ancient Armory – Check out this impressive Shield-Weaver cosplay with working lights!

Aloy cosplay by @sherolo
Photography by @brianvandenberg21

#horizonzerodawn #cosplay #horizoncosplay #aloy #aloycosplay #shieldweaver
  • Aloy, Despite the Nora – ❤️👏 Beautiful image and cosplay

Aloy cosplay by @takaminacosplay
Photography by @russell_photography_pnw

#horizonzerodawn #cosplay #horizoncosplay #aloy #aloycosplay #norabrave
  • Protector of the Nora 🏞️ Stunning photography and cosplay!

Aloy cosplay by @monono_creative_arts
Photography by @terobesarts

#horizonzerodawn #cosplay #horizoncosplay #aloy #aloycosplay #nora #noraprotector