From f34dd135703c5512fbf8da9b1afa18a0c5214a1c Mon Sep 17 00:00:00 2001 From: Gab_S Date: Wed, 15 Jan 2020 11:49:52 +0000 Subject: [PATCH] Delete 'Mapping/Esp32/esp.ino' --- Mapping/Esp32/esp.ino | 208 ------------------------------------------ 1 file changed, 208 deletions(-) delete mode 100644 Mapping/Esp32/esp.ino diff --git a/Mapping/Esp32/esp.ino b/Mapping/Esp32/esp.ino deleted file mode 100644 index b25b460..0000000 --- a/Mapping/Esp32/esp.ino +++ /dev/null @@ -1,208 +0,0 @@ -#include -#include -#include -#include - -const char * networkName = "COSMOTE-424630"; -const char * networkPswd = "tQThvFVAxRJhsYKg"; -const char * udpAddress = "192.168.1.76"; -const int udpPort = 6000; -SFEVL53L1X distanceSensor; -WiFiUDP udp; -boolean connected = false; - -#define MOTOR_PHASE_A 26 -#define MOTOR_PHASE_B 25 -#define MOTOR_PHASE_C 33 -#define MOTOR_PHASE_D 32 -#define HOMING_PIN 35 -unsigned long starttime; -unsigned long endtime; -float rotationtime; -int count = 0; -int flag = 0; - -int circle = 2048 * 3.25; - -char *buffer1; -char buffer2[20]; -int distance; -int angle; - -int step(); - -void setup() { - Wire.begin(); - if (distanceSensor.begin() == 0) //Begin returns 0 on a good init - { - Serial.println("Sensor online!"); - } - - connectToWiFi(networkName, networkPswd); - Serial2.begin(9600); - Serial.begin(9600); - Serial.println("Setup"); - pinMode(MOTOR_PHASE_A, OUTPUT); - pinMode(MOTOR_PHASE_B, OUTPUT); - pinMode(MOTOR_PHASE_C, OUTPUT); - pinMode(MOTOR_PHASE_D, OUTPUT); - pinMode(HOMING_PIN, INPUT); - starttime = millis(); - buffer1 = (char*) malloc((sizeof(char) + sizeof(unsigned long)) * sizeof(char) + 1); - while (digitalRead(HOMING_PIN) == HIGH)step(); - while (digitalRead(HOMING_PIN) == LOW) { - step(); - } - delay(2000); -} - -void loop() { - //if(count%circle==0)delay(5000); - for(count=0;count