This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Codeing By IOXhop : www.ioxhop.com | |
*/ | |
#define SRF05_Trig_PIN 12 | |
#define SRF05_Echo_PIN 13 | |
void setup() { | |
pinMode(SRF05_Trig_PIN, OUTPUT); | |
pinMode(SRF05_Echo_PIN, INPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Codeing By IOXhop : www.ioxhop.com | |
*/ | |
#define Trig_PIN 12 // Pin connect to Trig pin | |
#define Echo_PIN 13 // Pin connect to Echo pin | |
void setup() { | |
pinMode(Trig_PIN, OUTPUT); | |
pinMode(Echo_PIN, INPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Codeing By IOXhop : www.ioxhop.com | |
*/ | |
#include <SoftwareSerial.h>; | |
#define TX_PIN 2 // Pin connect to Tx | |
#define RX_PIN 3 // Pin connect to Rx | |
SoftwareSerial mySerial(RX_PIN, TX_PIN); // Rx, Tx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Codeing By IOXhop : www.ioxhop.com | |
*/ | |
#define OUT_PIN A0 | |
void setup() { | |
Serial.begin(9600); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Codeing By IOXhop : www.ioxhop.com | |
*/ | |
#define Trig_PIN 12 | |
#define Echo_PIN 13 | |
void setup() { | |
pinMode(Trig_PIN, OUTPUT); | |
pinMode(Echo_PIN, INPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: main.c | |
* Author: [email protected] | |
* | |
* Created on 3/18/2017 8:09:13 AM UTC | |
* "Created in MPLAB Xpress" | |
* Full code you can see : https://mplabxpress.microchip.com/mplabcloud/example/details/306 | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned long __pulseIn(int pin, int lavel) { | |
while(digitalRead(pin) != lavel) ; | |
unsigned long time_s = 0; | |
while(digitalRead(pin) == lavel) { | |
delayMicroseconds(1); | |
time_s++; | |
} | |
return time_s; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Coding By IOXhop : www.ioxhop.com | |
#include <Servo.h> | |
Servo myservo; | |
#define UNLOCK_POS 5 | |
#define LOCK_POS 100 | |
void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Coding By IOXhop : www.ioxhop.com | |
#include <Servo.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
#define UNLOCK_POS 5 | |
#define LOCK_POS 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <HLW8012.h> | |
#define SERIAL_BAUDRATE 9600 | |
// GPIOs | |
#define SEL_PIN 11 | |
#define CF1_PIN 13 | |
#define CF_PIN 12 | |
// Check values every 2 seconds |