EB - Toggle Touch Sensor

$1.60

  • Model: EB0100010M
  • Shipping Weight: 2gram
  • 9980 Units in Stock

Add to Cart:



Item specifics

Brand Name:Maker Studio

Product Description

Electronic Brick - Toggle Touch Button is a touch input module. It memorizes the state of the button after each operation until next touch.

 

Features

  • Working Voltage: 3.3V-5V
  • With Power Light and Signal Light
  • High sensitivity
  • With Makerduino Demo Code
  • Compact size
  • Weight:2g

 

Applications

  • State control

 

Details

aeProduct.getSubject()

 

Use with Makerduino

The following steps show how to use EB - Toggle Touch Button with Makerduino.

Materials

  • Makerduino
  • Electronic Brick Shield
  • EB - Toggle Touch Button
  • A/B type USB cable
  • Female DuPont wires

Steps

1. Connect Electronic Brick Shield onto Makerduino to bring out all the Makerduino Pins.

aeProduct.getSubject()

 

2. Connect EB - Toggle Touch Button to Makerduino as following:

 

aeProduct.getSubject()

3. Connect the Makerduino to Computer by the USB cable.

 

4. Download the Makerduino demo code EB - Toggle Touch Button.zip. Unzip the code directly into the libraries folder.

 

5. Open Makerduino IDE, choose the right Board and Serial Port. Open the sketch EB_ToggleTouchButton.ino and upload it to the Makerduino.

 

The following is the demo code for EB - Toggle Touch Button. (Note: It could be a little different from the code file downloaded. Please follow the downloaded file.)

 

/*

  EB - Toggle Touch Sensor demo code

 

  Detect the state of a Touch Sensor and display the information on Serial Monitor

  When the sensor is touched, the instruction LED on the board will turn on.

  When takes the finger off the sensor, the light will keep on.

  When touch again, the light will turn off.

 

*/

 

// constants won't change. They're used here to

// set pin numbers:

const int sensorPin = 2;     // Touch the sensor on the top side or the bottom side

 

int sensorState = LOW;

int saveState = LOW;

void setup() {

  // initialize the sensor pin as an input:

  pinMode(sensorPin, INPUT);    

  Serial.begin(9600);

}

void loop(){

  // read the state of the sensor value:

  sensorState = digitalRead(sensorPin);

 

  if(sensorState != saveState){

        saveState = sensorState;

        Serial.println("Sensor is touched ");

    }

}

 

6. Check the Results. After the sketch is successfully uploaded, let's open the Serial Monitor. No touch, no information. When the button is touched, the Monitor displays as following.             

 

aeProduct.getSubject()

 

Download information

https://drive.google.com/?usp=folder&authuser=0&usp=folder#folders/0BzxrU4QvH7jEd3ZJTVdnNUpXNVE

Find EB - Toggle Touch Button Material.zip to download schematic and other material.

about us 02

This product was added to our catalog on Tuesday 11 February, 2014.

Your IP Address is: 54.224.204.189
Copyright © 2017 Maker Studio