GPIO input output

HI need some hints

I am confused using GPIO comands
I want to add two switches for detecting object in front of metalborg
Nice if you can give me the setup I need to program the switch with GPOI
- If both switches are hi then stop motors, go rew 1 sec and turn 180 degre
- Left switch hi, stop motors go rew 1 sec turn right
- right switch hi, stop motors go rew 1 sec turn left

I will inplement the logic in automode sequens script for ultrasonic sensor are done
Have added butten logic for line folow mode and pause mode

Idont know were to get the 5v from the pins are alreaddy used for i2c
Have conected treborg with UltraBorg XLoborg and Ledborg ontop of the rpi2b

Is the any difrent between the comand import:
import wiringpi2 as wiringpi
VS
import RPi.GPIO as GPIO

Attachments: 
gt213296@gmail.com's picture

Here is a link for GPIO import wiringpi2 as wiringpi.
This side worked for me.

http://raspi.tv/2013/how-to-use-wiringpi2-for-python-on-the-raspberry-pi...

Subscribe to Comments for "GPIO input output"