User avatar
raspberrypiguy1
Posts: 379
Joined: Sun Sep 02, 2012 7:01 pm

Raspberry Pi - Photosensors and Arduino...

Sun Feb 03, 2013 7:11 pm

Hello!

I recently uploaded a new video all about using Photosensors with the Raspberry Pi and Arduino.... GIve it a look here:

http://www.youtube.com/watch?v=CvDWmUw2XTw

Here is the code that I use in the tutorial! Just copy and paste into the Arduino IDE!

Code: Select all

int sensePin = 0;

void setup(){
  Serial.begin(9600);
}

void loop(){
  Serial.println(analogRead(sensePin));
  delay(500);
}
And that should do the trick!

The Raspberry Pi Guy
Matt, The Raspberry Pi Guy YouTube channel, author of Learn Robotics with Raspberry Pi, available now: http://mybook.to/raspirobots, Computer Science & Electronics Undergraduate at The University of Edinburgh

Return to “C/C++”