Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <NewSoftSerial.h>
- #include <ESP8266WiFi.h>
- #include <WiFiClientSecure.h>
- #include <FPC1020.h>
- extern unsigned char l_ucFPID;
- extern unsigned char rBuf[192]; //Receive return data
- #define sw_serial_rx_pin 2 // Connect this pin to TX on the FPC1020
- #define sw_serial_tx_pin 3 // Connect this pin to RX on the FPC1020
- const char* ssid = "-------";
- const char* password = "-------";
- const char* host = "-------";
- String url = "-------?id=";
- NewSoftSerial swSerial(sw_serial_rx_pin, sw_serial_tx_pin); // Fingerprint serial (RX, TX)
- FPC1020 Finger(&swSerial);
- void setup() {
- Serial.begin(115200);
- Serial.print("connecting to ");
- Serial.println(ssid);
- WiFi.begin(ssid, password);
- while (WiFi.status() != WL_CONNECTED) {
- delay(500);
- Serial.print(".");
- }
- pinMode(4, INPUT);
- }
- void loop() {
- Serial.println("Please put your finger on the Sensor.");
- while(Serial.available()<=0);
- if( Finger.Search()){
- Serial.print("Success, your User ID is: ");
- url = "-------?id=" + l_ucFPID;
- Serial.println( l_ucFPID, DEC);
- WiFiClient client;
- if (!client.connect(host, 80)) {
- Serial.println("connection failed");
- return;
- }
- client.print(String("GET ") + url + " HTTP/1.1rn" +
- "Host: " + host + "rn" +
- "User-Agent: BuildFailureDetectorESP8266rn" +
- "Connection: closernrn");
- String line = "";
- while (client.connected()) {
- line = client.readString();
- }
- Serial.println(line);
- }
- else {
- Serial.println("Failed, please try again.");
- }
- }
- C:Program Files (x86)ArduinolibrariesNewSoftSerialNewSoftSerial.cpp:41:27: fatal error: avr/interrupt.h: No such file or directory
- #include <avr/interrupt.h>
- ^
- compilation terminated.
- exit status 1
- Error compiling for board WeMos D1 R2 & mini.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement