| Modèle : | DZD000106 |
| Fabricant : | IteadStudio |
| Disponibilité : | 4 Ã 8 Semaines |
| N° de visites: | 814 |
Electronic brick of button switch is finger-sized, which can be connected to I/O port of main board or externally disconnected to check the switch state so as to control ON/OFF of LED lamp.
1. Plug and play, easy to use. Compatible with the mainstream 2.54 interfaces and 4-Pin Grove interfaces in the market.

2. With use of M4 standard fixed holes, compatible with M4-standard kits such as Lego and Makeblock

3. Hardware with debouncing function for more stable output

| PCB size | 36.0mm X 14.0mm X 1.6mm |
| Working voltage | 3.3 or 5V DC |
| Operating voltage | 3.3 or 5V DC |
| Compatible interfaces | 2.54 3-pin interface and 4-pin Grove interface(1) |
Note 1: S for digital output port, V and G for voltage at the common collector and ground respectively. Generally speaking, digital output is VCC; when the button is pressed down, the digital output is 0V.
| Parameter | Min. | Typical | Max. | Unit |
| Working voltage | 3 | 5 | 5.5 | VDC |
| Digital output voltage(VCC=5V) | 0 | - | 5 | V |
Connect S port of electronic brick of button switch to D2 port of Arduino board, and we will use the following program to read the digital value. When the digital value is high level, LED lamp will be ON; when the digital value is low level, LED lamp will be OFF.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
int Button=2; //connect button to D2int LED=13;void setup(){pinMode(LED, OUTPUT);pinMode(Button, INPUT); }void loop(){ if(digitalRead(Button)==HIGH) //when the digital output value of button is high, turn on the LED.{digitalWrite(LED, HIGH); } if(digitalRead(Button)==LOW) //when the digital output value of button is low, turn off the LED.{digitalWrite(LED, LOW);} } |
| Brick Type | Button and Switch |
|---|---|
| Brick Interface | 3PIN |
| Brick Power Supply | 5V |
| Board Size | 36 × 14 × 1.6mm |
| LED Color | No |
| Weight | 20.00g |