diff --git a/.theia/settings.json b/.theia/settings.json new file mode 100644 index 0000000..a3d25ee --- /dev/null +++ b/.theia/settings.json @@ -0,0 +1 @@ +"sketch": "contact.ino" \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cc67606 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "python.linting.pylintEnabled": true, + "python.linting.enabled": true +} \ No newline at end of file diff --git a/controller.py b/controller.py new file mode 100644 index 0000000..62f9c2b --- /dev/null +++ b/controller.py @@ -0,0 +1,7 @@ +import serial +ser = serial.Serial('/dev/ttyUSB0', 115200) +print(ser.name) + +while 1: + line = ser.readline() # read a '\n' terminated line + print(line) \ No newline at end of file diff --git a/sketch_september3a/.theia/launch.json b/sketch_september3a/.theia/launch.json new file mode 100644 index 0000000..4f01fb8 --- /dev/null +++ b/sketch_september3a/.theia/launch.json @@ -0,0 +1,12 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + "version": "0.2.0", + "configurations": [ + { + "name": "Arduino", + "type": "arduino", + "request": "launch" + } + ] +} diff --git a/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.bin b/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.bin new file mode 100644 index 0000000..80c356c Binary files /dev/null and b/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.bin differ diff --git a/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.elf b/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.elf new file mode 100755 index 0000000..b773cf3 Binary files /dev/null and b/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.elf differ diff --git a/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.partitions.bin b/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.partitions.bin new file mode 100644 index 0000000..0e52b4c Binary files /dev/null and b/sketch_september3a/sketch_september3a.esp32.esp32.firebeetle32.partitions.bin differ diff --git a/contact.ino b/sketch_september3a/sketch_september3a.ino similarity index 81% rename from contact.ino rename to sketch_september3a/sketch_september3a.ino index 0bae69f..bc21e71 100644 --- a/contact.ino +++ b/sketch_september3a/sketch_september3a.ino @@ -4,7 +4,6 @@ #include #define SS_PIN 5 #define RST_PIN 9//not used for esp32 - byte readCard[4]; MFRC522 mfrc522(SS_PIN, RST_PIN); @@ -39,11 +38,10 @@ void setup() { // Bring Up Wifi WiFi.begin(ssid, password); - //while (WiFi.status() != WL_CONNECTED) { - // delay(100); - // Serial.print("."); - //} - + while (WiFi.status() != WL_CONNECTED) { + delay(100); + Serial.print("."); + } Serial.println(); Serial.print("IP: "); Serial.println(WiFi.localIP()); @@ -53,19 +51,19 @@ void setup() { mfrc522.PCD_Init(); // Piep - ledcSetup(channel, freq, resolution); - ledcAttachPin(27, channel); - for (int i = 0; i<20000; i=i+100){ - ledcWriteTone(channel, i); - Serial.println(i); - delay(200); - } +// ledcSetup(channel, freq, resolution); +// ledcAttachPin(27, channel); +// for (int i = 0; i<20000; i=i+100){ +// ledcWriteTone(channel, i); +// Serial.println(i); +// delay(200); +// } } void loop() { - //if(WiFi.status()== WL_CONNECTED){ + if(WiFi.status()== WL_CONNECTED){ if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } @@ -79,8 +77,8 @@ void loop() { Serial.print(readCard[i], HEX); CardID=CardID+String(readCard[i], HEX); } - //sendData(CardID); + sendData(CardID); Serial.println(""); mfrc522.PICC_HaltA(); - //} + } } \ No newline at end of file