Posts

Showing posts with the label Controlling an LED

Internet Of Things: Controlling an LED/Bulb using Facebook Messenger Chatbot via Chatfuel and MQTT!

Image
Material to get started: ESP8266 12e NodeMCU manufactured by Lolin (Check the datasheet, if you are using a different version.) Fig. 2: ESP8266 12e by Lolin USB Type C cable to program ESP8266 12e from a laptop or PC. Most Android phones use this type of cable. Fig. 3: USB Type C Cable Relay Module – Relay is an electro-mechanical switching device. In a relay, we can control switching AC or DC appliances digitally by providing input to relay input pins. Here we have used a 1-channel relay operating on 5 Volts. Fig. 4: 1 Channel Relay Module To connect your AC appliance, use the following connection with the Relay Module use the following connection. The Signal pin is IN. Fig. 5: Relay Connection With some wires and breadboard. Back End Set-up : Set-up with Facebook Messenger: We need a Virtual human to chat with. For this, we will create a Facebook Page. Fig. 6: Create a Facebook Page To create a Facebook Page, click  here  and Get Started with...

Controlling an LED using an Arduino Compatible TTP223B Capacitive Touch Sensor.

Image
This project was developed with the intention of replacing the traditional button key. It can be used along with a microcontroller or an arduino. When a capacitive load (such as a human hand) is in close proximity to the sense-pad or touches it, the sensor detects the change in capacitance and activates the switch. Code: #define  ctsPin 2  int ledPin = 13; void setup() {    Serial.begin(9600);   pinMode(ledPin, OUTPUT);   pinMode(ctsPin, INPUT); }   void loop() {   int ctsValue = digitalRead(ctsPin);   if (ctsValue == HIGH) {      digitalWrite(ledPin, HIGH);      Serial.println("TOUCHED");   }    else {      digitalWrite(ledPin,LOW);     Serial.println("not touched");   }   ...