#slideswitch
Explore tagged Tumblr posts
adafruit · 2 months ago
Text
New at Adafruit this week! Slide Switch & 🪶 Feather Mounts for LEGO builds 📷 Raspberry Pi AI Camera (Sony IMX500), 🧲 ScoutMakes DRV5032 Magnetic Sensor 🖥️ RP2350 Adapter for HDMI Displays. Build, create, and innovate! https://adafruit.com/new
5 notes · View notes
makers-muse · 5 months ago
Text
Make an Obstacle Avoiding Robot
Tumblr media
Overview
This project is about obstacle avoiding robot in this robot it will calculate the distance from the obstacles and make it move forward, backward, right and left.
In this obstacle avoiding robot if the ultrasonic sensor senses any obstacle it will give input to the hobby generator and it will move accordingly. If the slide switch is OFF then the motor will not work.
Hardware required 
Arduino Uno R3
Jumper Wires
L293D
Hobby generator
Slide Switch
Ultrasonic Sensor
Tumblr media
Fig 1.  Circuit Diagram
Arduino Code : const int trigPin=13; const int echoPin=12; int enableA=8; const int motorPin1=3; const int motorPin2=5; int enableB=9; const int motorPin3=4; const int motorPin4=2; const int slideSwitch=7; int duration; int distance; void setup() { pinMode(enableA,OUTPUT); pinMode(enableB,OUTPUT); pinMode(motorPin1,OUTPUT); pinMode(motorPin2,OUTPUT); pinMode(motorPin3,OUTPUT); pinMode(motorPin4,OUTPUT); pinMode(trigPin,OUTPUT); pinMode(echoPin,INPUT); pinMode(slideSwitch,INPUT_PULLUP); analogWrite(enableA, 200); analogWrite(enableB, 200); Serial.begin(9600); } void loop() { if(digitalRead(slideSwitch) == LOW){ findDistance(); if(distance<=10){ //The robot will stop for a while rightMotor(0); leftMotor(0); delay(200); //The robot will move backward rightMotor(-255); leftMotor(-255); delay(300); //The robot will turn towards the right rightMotor(255); leftMotor(-255); delay(200); } else{ //The robot will move forwards rightMotor(255); leftMotor(255); } } //Since the Slide Switch is off, the robot will not move else{ rightMotor(0); leftMotor(0); } } void rightMotor(int speed) { analogWrite(enableB,speed); if(speed>0){ digitalWrite(motorPin3,HIGH); digitalWrite(motorPin4,LOW); } else if(speed<0){ digitalWrite(motorPin3,LOW); digitalWrite(motorPin4,HIGH); } else{ digitalWrite(motorPin3,LOW); digitalWrite(motorPin4,LOW); } } void leftMotor(int speed) { analogWrite(enableA,speed); if(speed>0){ digitalWrite(motorPin1,HIGH); digitalWrite(motorPin2,LOW); } else if(speed<0){ digitalWrite(motorPin1,LOW); digitalWrite(motorPin2,HIGH); } else{ digitalWrite(motorPin1,LOW); digitalWrite(motorPin2,LOW); } } void findDistance(){ digitalWrite(trigPin,LOW); delayMicroseconds(2); digitalWrite(trigPin,HIGH); delayMicroseconds(10); duration=pulseIn(echoPin,HIGH); distance=duration*0.0345/2; Serial.println(distance); }
Precautions
Connections should be done properly.
Arduino is case Sensitive so code accordingly.
Give different and appropriate colours to the wires.
Do you have questions regarding our STEM program?
Contact us anytime.
Take your first step into the magical world of coding for kids
0 notes
looksmartteam · 8 years ago
Photo
Tumblr media
#smart7team #neopixels #neominipixels #motionsensor #tripleaxisaccelerometer #tapdetection #freefalldetection #temperaturesensor #soundsensor #minispeaker #alligatorclipfriendly #i2c #uart #pwmoutput #leds #slideswitch #pushbuttons #rightpushbuttons #leftpushbutton #pins #analoginputs #analogoutput #pwmoutput #pwminput #p3000 @adafruit @arduino.projects @arduinoorg @legoeducation @lego #diy #smart7owls
0 notes
wwwbastrophomenhealth · 2 years ago
Text
Lumilite All Purpose 2AA Flashlight (Black)
Lumilite All Purpose 2AA Flashlight (Black)
Format: BulkPlatform: N/A The perfect flashlight forall your illumination needs Product Information The Lumilite All Purpose 2AA Flashlight offers a great style and designto provide light when you need it. Incorporating a traditional slideswitch, standard PR type bulb, and a handy wrist strap, youcan depend on this flashlight to do the job whether at home, camping,or anywhere else where you need…
View On WordPress
0 notes
androidvisual-blog · 7 years ago
Text
SlideSwitch
SlideSwitch Android Visual | Android Design Library | Android Template | Android Design | Android Library http://www.androidvisual.com/slideswitch/
0 notes
wearableswinter17 · 8 years ago
Text
Tumblr media
Nicole Dalager \\ Assignment 1 \\ Adafruit Circuit Playground
In my first attempts of programming the Adafruit Circuit Playground, listed below are the various input and output relationships...
1. Left button turns on the right built-in LEDs
2. Right button turns on the left built-in LEDs
3. Slideswitch turns on light sensor and a higher pitched sound goes off with bright light and low pitch noise are emitted with dark light
4. The accelerometer sensor takes changes data from slight X- axis changes to turn on and off certain LEDs
Video will be shown in a later post
0 notes
wwwbastrophomenhealth · 2 years ago
Text
Lumilite All Purpose 2AA Flashlight (Red)
Lumilite All Purpose 2AA Flashlight (Red)
Format: BulkPlatform: N/A The perfect flashlight forall your illumination needs Product Information The Lumilite All Purpose 2AA Flashlight offers a great style and designto provide light when you need it. Incorporating a traditional slideswitch, standard PR type bulb, and a handy wrist strap, youcan depend on this flashlight to do the job whether at home, camping,or anywhere else where you need…
View On WordPress
0 notes
wwwbastrophomenhealth · 2 years ago
Text
Lumilite All Purpose 2D Flashlight (Blue)
Lumilite All Purpose 2D Flashlight (Blue)
Format: BulkPlatform: N/A The perfect flashlight forall your illumination needs Product Information The Lumilite All Purpose 2D Flashlight offers a great style and designto provide light when you need it. Incorporating a traditional slideswitch, standard PR type bulb, and a handy wrist strap, youcan depend on this flashlight to do the job whether at home, camping,or anywhere else where you need…
Tumblr media
View On WordPress
0 notes
wwwbastrophomenhealth · 2 years ago
Text
Lumilite All Purpose 2D Flashlight (Red)
Lumilite All Purpose 2D Flashlight (Red)
Format: BulkPlatform: N/A The perfect flashlight forall your illumination needs Product Information The Lumilite All Purpose 2D Flashlight offers a great style and designto provide light when you need it. Incorporating a traditional slideswitch, standard PR type bulb, and a handy wrist strap, youcan depend on this flashlight to do the job whether at home, camping,or anywhere else where you need…
View On WordPress
0 notes