Product Manual
SlidE switch plug [v1.1]
Updated on: 27th November 2017
Product Manual: Slide Switch Plug
Index Introduction
2
Specification
2
Variants
2
Supported cables:
3
Details
3
How to interface?
4
Example Codes Code 1: Arduino
6
Elint Labz (www.elintlabz.in)
Page 1 of 7
Product Manual: Slide Switch Plug
About Elint Labz Elint Labz (usually abbreviated as EL) is an electronics design & development tools designer & manufacturer with headquarters in Bengaluru, India. We design, develop & manufacture development boards based on micro-controller & microprocessors, breakout boards for various sensors & actuators. Our domain & expertise is in the area of Electronics & Embedded Systems. Elint Labz was founded in 2014 however the actual operations started from 2015 when it became a full time subsidiary of Hogst Innovative Solutions Pvt. Ltd. & is presently a part of Ajaramara Group a conglomerate of various domains of industries, registered in India as Ajaramara Dynamics Pvt. Ltd. under Companies Act of 2013. As in the name company (Elint Labz) – Electronic intelligence (ELINT) is intelligence gathered by the use of electronic sensors, Laboratories (LABZ) are facilities that provides controlled conditions in which scientific or technological research, experiments and measurement may be performed. EL is an enterprise built to develop smart & intelligent electronics & EL is committed to help achieve electronics literacy in India. No matter the vision or skill level, our products and resources are designed to make electronics & programmable development hardware more accessible. Elint Labz as a platform helps developers & young engineers from prototyping to product development. We provide open source hardware solutions and small quantity manufacturing services using a design from manufacturing framework. We are a strong promoter of the maker movement in India, most of the manufacturing happens with support of our various Indian partners & couple of our collaboration partners who have manufacturing & sourcing facilities in Germany, Korea & Shenzhen. To know more visit the about us section on our website: http://elintlabz.in/about-us/ Elint Labz (HQ) ˗ #200 1st main Arekere MICO layout 2nd stage Bengaluru 560076 KA [Marked on Google Maps] ✆ +91 855 377 2525 ː
[email protected]
Elint Labz (www.elintlabz.in)
Page 2 of 7
Product Manual: Slide Switch Plug
Introduction Slide switch is a simple SPDT switch, commonly used as a ON/OFF switch in electronic circuits or just as a general control switch. Elint Labz has built a plug to utilize this unique hardware. This plug can be mounted anywhere using screws. In the below picture you can see Slide switch plug. It has a small white strip which is pasted on the back of the PCB which can be used as indicator to specify the name, component code, etc.
Specification
● Operating voltage: 5v ● Size: 18mm x 26mm
Variants Slide Switch Type
Version
Port Type
SKU
Straight
v2
Straight
EL-SSPL-ST-201
Right angled
EL-SSPL-ST-202
Straight
EL-SSPL-RA-201
Right angled
EL-SSPL-RA-202
Right angled
Elint Labz (www.elintlabz.in)
v2
Page 3 of 7
Product Manual: Slide Switch Plug
Supported cables: ● 4-4 A cable .
Details
Slide switch has a slider that slides in horizontal direction. Slide switch plug has an interfacing port with four pins named as G, V & D1 and D2. Here G represents Ground, V represents VCC and D1 represents Data pin1 and D2 represents Data pin2 at which digital input signals from the plug can be obtained. Depending on the switch position one of the Data pins goes HIGH and the other Data pin remains at LOW level. Note: Both the data pins cannot go HIGH/LOW at the same time.
Elint Labz (www.elintlabz.in)
Page 4 of 7
Product Manual: Slide Switch Plug
How to interface? Use the supported interfacing cable to connect Slide switch plug to the controller board. Here 4-4A cable is used to connect the Slide switch plug to the pluguino board. One end of the cable is connected to the plug and other end of the cable must be connected to the controller board. Always ensure that black wire of the cable is connected to the G pin on both sides. In the below given pictures one can see 4-4A cable is used to connect Slide switch plug with the Pluguino Board. The data pins D1 and D2 of the Slide switch plug is connected to the 12th and 11th GPIO pins respectively on the controller board.
Elint Labz (www.elintlabz.in)
Page 5 of 7
Product Manual: Slide Switch Plug
Elint Labz (www.elintlabz.in)
Page 6 of 7
Product Manual: Slide Switch Plug
Example Codes Code 1: Arduino #define SS_Pin1 12 // push button plug is connected to 12th pin #define SS_Pin2 11 // push button plug is connected to 11th pin #define Led_Pin1 9 // LED plug is connected to 9th pin #define Led_Pin2 10 // LED plug is connected to 10th pin boolean SS_State1 = LOW; // variable to store pushbutton status boolean SS_State2 = LOW; // variable to store pushbutton status void setup() { pinMode(Led_Pin1, OUTPUT); // Make 9th pin as OUTPUT pin pinMode(Led_Pin2, OUTPUT); // Make 10th pin as OUTPUT pin pinMode(SS_Pin1, INPUT); // Make 12th pin as INPUT pin pinMode(SS_Pin2, INPUT); // Make 11th pin as INPUT pin } void loop() { SS_State1 = digitalRead(SS_Pin1); // read the state of the pushbutton and store it. SS_State2 = digitalRead(SS_Pin2); // read the state of the pushbutton and store it. if ( SS_State1 == HIGH) //Compare button state with HIGH { Elint Labz (www.elintlabz.in)
Page 7 of 7
Product Manual: Slide Switch Plug
digitalWrite(Led_Pin1, HIGH); turn on LED1. } else { digitalWrite(Led_Pin1, LOW); LED1. if ( SS_State2 == HIGH) { digitalWrite(Led_Pin2, HIGH); turn on LED2 } else { digitalWrite(Led_Pin2, LOW); LED } } }
// If button state is HIGH then
// If button state is LOW,turnnoff //Compare button state with HIGH // If buttonstate is HIGH then
//If button state is LOW then turn OFF
Output video: https://youtu.be/s6nA6jLlhuU
Older Versions
● Slide switch plug (v 1.0)
Elint Labz (www.elintlabz.in)
Page 8 of 7
Product Manual: Slide Switch Plug
Elint Labz (www.elintlabz.in)
Page 9 of 7