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,0xf1,0xd7,0xb1,0x36,0x54,0x99,0xd3,0x47,0x4c,0x24,0xc7,0x07,0x5c,0xa4,0x10,0x7d,0x1a,0xe4,0xcf,0x1c,0x8a,0x58,0x6b,0x8f,0x15,0x26,0x3c,0xdb,0x78,0xa5,0xab,0x98,0x77,0x82,0x6a,0x36,0x7b,0xef,0xb0,0x56,0x32,0x65,0x60,0xec,0x2d,0x6c,0xe7,0x53,0x27,0x22,0x9e,0xd6,0x41,0xe8,0x35,0xb1,0x5e,0x7b,0x8e,0xe0,0xb2,0x6e,0x9b,0x47,0x65,0xee,0xe2,0xc1,0x17,0x99,0x95,0x4c,0x0e,0xcb,0x00,0x1f,0x32,0x7f,0x38,0x1e,0x93,0xcb,0x2d,0xd7,0x04,0x0e,0xc3,0x17,0x59,0xa5,0x54,0x7c,0x75,0x85,0x60,0x4a,0x56,0x85,0x31,0x52,0x68,0xb2,0x62,0xc8,0x27,0x92,0x28,0xba,0xc1,0x45,0xb1,0x34,0xd1,0xc1,0x6f,0x6c,0xcd,0x14,0x13,0x31,0x43,0x96,0x19,0x93,0xeb,0x59,0x14,0xa1,0x18,0x81,0x2c,0x67,0x2a,0xcc,0xe4,0x1f,0x3c,0x4d,0x69,0x28,0xd5,0x26,0x62,0x62,0xfc,0xfb,0x45,0x94,0xc8,0x58,0x47,0x1f,0xd9,0x2a,0x7a,0x7b,0xf9,0xfe,0x5d,0xf4,0x26,0x65,0x19,0x32,0x36,0xe2,0x22,0x2f,0x4c,0x54,0x0a,0x21,0xe3,0xf1,0x92,0x90,0x60,0x9e,0x2f,0xe7,0x51,0x6e,0x55,0x9b,0xaf,0xa5,0xca,0xa0,0xaa,0x23,0x22,0xe6,0x90,0xb3,0x45,0xaf,0x24,0xed,0x21,0xc7,0x45,0x9c,0xf2,0xf8,0xeb,0xa2,0x07,0x9d,0x76,0xaf,0xb9,0x8a,0x53,0xf6,0x73,0x21,0x5c,0x12,0x0c,0x86,0x3d,0x72,0x4d,0xd3,0x02,0xe4,0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b4,0x44,0x21,0x79,0xc0,0xd7,0x64,0xe0,0x77,0xc2,0x84,0xa2,0x79,0x72,0x70,0xa4,0x08,0x4d,0xb9,0x26,0xaf,0x52,0xb9,0x1a,0x5a,0x22,0x82,0x98,0x50,0xa4,0x50,0xe9,0xaf,0xab,0x2f,0xa8,0x88,0x60,0x02,0xe6,0x61,0x0c,0xe5,0x0d,0x2b,0xb7,0xb0,0xee,0xb0,0xb1,0x92,0x81,0x82,0xfd,0x21,0x7c,0x05,0x40,0x0d,0xc6,0xc1,0x4d,0x70,0xf3,0x32,0x08,0x2c,0x4b,0x9b,0x14,0xbf,0xd8,0x56,0xd1,0x72,0xd2,0xff,0x0b,0xa6,0x0e,0x17,0xae,0xf4,0x4a,0x35,0xe8,0xbb,0x8a,0x69,0x5d,0x64,0xe9,0x9b,0x4a,0x70,0x0f,0xa0,0x09,0x8b,0x63,0xd4,0x47,0x5b,0x1c,0x00,0xad,0x37,0x42,0xb9,0x5e,0x6b,0x66,0xdc,0xfe,0x11,0xed,0x5b,0x57,0x33,0x4e,0x10,0x97,0x07,0x25,0x35,0x2a,0x8e,0x0d,0xfa,0xb7,0x52,0xf1,0x3f,0x2c,0x59,0xda,0xa6,0x2f,0xa5,0x45,0x64,0xda,0xa1,0xfd,0x0f,0x53,0x86,0x63,0x86,0x68,0x53,0x7a,0x59,0x8e,0xf4,0xce,0x60,0x71,0x49,0x32,0x0c,0x5d,0x76,0x02,0x5c,0x0e,0x31,0x33,0xd2,0x47,0x34,0xdc,0x56,0xe3,0x31,0xf6,0xab,0xba,0xde,0xa2,0xa8,0x84,0x97,0x1a,0xf9,0x4e,0xb6,0x20,0x6b,0x9a,0x6a,0x74,0x38,0x67,0x7f,0xa1,0x50,0x99,0xcc,0xa7,0xce,0xea,0x73,0xb9,0xf2,0xa3,0x91,0x3f,0xf3,0x2b,0x7f,0xb6,0xff,0xd5,0x39,0x07,0xcc,0x50,0xd4,0xed,0xc6,0xe1,0x78,0x03,0xf9,0x65,0x2e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c,0x92,0x57,0x2a,0xbe,0x8a,0xa9,0x8a,0x76,0xbb,0x1d,0xa6,0xe5,0x84,0xed,0x43,0xfb,0x67,0x41,0x93,0x37,0x2e,0xb5,0xcc,0xde,0x54,0xae,0xb6,0x5d,0x4a,0x60,0x54,0x2f,0x87,0xa9,0x73,0xeb,0xe8,0xa1,0x75,0x98,0xed,0x50,0x55,0xbe,0xf0,0xf5,0xa0,0x6a,0x5f,0x2e,0x59,0xf0,0xe2,0xc7,0xd6,0x28,0xcc,0x09,0xf9,0xeb,0x2f,0x07,0x1e,0xd7,0xed,0x8d,0x2c,0x17,0xb0,0xb4,0x7d,0x8f,0x06,0xb6,0x77,0x6f,0x15,0xb3,0x59,0xad,0x45,0x37,0x78,0x1b,0x29,0xf7,0x68,0x53,0x7d,0x14,0x33,0x85,0xaa,0xde,0xd5,0x5d,0xee,0x60,0x5c,0x8c,0xb7,0x4d,0x51,0x68,0xfd,0x05,0x82,0x17,0x66,0x86,0x79,0xd2,0x56,0x8c,0xe3,0x48,0x29,0xbf,0xab,0x46,0x6d,0x2b,0xe1,0xde,0x97,0x51,0x98,0xfd,0xb0,0xd5,0xac,0xdb,0x6c,0xdd,0x6c,0x63,0x27,0xd0,0x5a,0xe3,0x87,0x1d,0xbf,0xfc,0xdb,0x5e,0xf7,0x98,0x0c,0xba,0xce,0x19,0x92,0x19,0xf6,0xdb,0x09,0x34,0x00,0x93,0x39,0x99,0x0c,0x3b,0xfa,0x3a,0xc6,0x2d,0xb2,0x96,0x0e,0x38,0xb0,0x39,0x51,0x2e,0x06,0x83,0x61,0x39,0xd0,0x76,0x53,0xa6,0x4d,0x2c,0x8a,0x14,0x73,0xcf,0xf1,0xb9,0xbb,0x4d,0x6b,0x6d,0xdb,0x19,0x23,0xc8,0xf5,0xeb,0x6e,0x8d,0xef,0x24,0xe1,0xfe,0x83,0xd4,0x23,0x72,0x70,0xdf,0xac,0xce,0x57,0x96,0x86,0xee,0x7d,0x31,0x34,0x96,0xd0,0xbe,0x1b,0xd9,0xb4,0x72,0x0b,0x8b,0x3a,0x43,0xce,0x21,0x97,0x2c,0xd6,0xe6,0x56,0xbe,0x1f,0xb9,0xdc,0xb2,0x5c,0xaa,0xf5,0x64,0xd8,0x2f,0x65,0x5b,0xcf,0xe6,0x54,0x9c,0xb3,0x8d,0x62,0xcc,0x3a,0xc2,0xa1,0xfe,0x49,0x5e,0x4c,0x30,0x2a,0xde,0x2a,0x18,0x0d,0xc6,0xe0,0x3f,0xa8,0x06,0xe4,0x58,0x77,0x41,0xcd,0x18,0xf8,0xa0,0x6c,0x2f,0x3f,0x59,0x1d,0x5a,0xa2,0xa0,0xc9,0xc8,0x6e,0xb5,0x38,0xb9,0xbf,0x2f,0xba,0x4d,0xe7,0xd6,0xbb,0x63,0x80,0x77,0x85,0x92,0xe1,0x2b,0x3b,0x7b,0x3b,0x80,0x7d,0x7f,0xf6,0x2f,0x45,0xf3,0xa8,0x7c,0x73,0xc6,0x8b,0xb4,0xfd,0xd3,0xee,0x6f,0xc6,0xf3,0x65,0xfc,0xbb,0x13,0x00,0x00 }; //const char* ssid = "CMA_WiFi_Egg_03"; const char* ssid = "fablab"; const char* password = "27796851"; //const char* ssid = "CMY"; //const char* password = "22222222"; #define PWDN_GPIO_NUM 32 #define RESET_GPIO_NUM -1 #define XCLK_GPIO_NUM 0 #define SIOD_GPIO_NUM 26 #define SIOC_GPIO_NUM 27 #define Y9_GPIO_NUM 35 #define Y8_GPIO_NUM 34 #define Y7_GPIO_NUM 39 #define Y6_GPIO_NUM 36 #define Y5_GPIO_NUM 21 #define Y4_GPIO_NUM 19 #define Y3_GPIO_NUM 18 #define Y2_GPIO_NUM 5 #define VSYNC_GPIO_NUM 25 #define HREF_GPIO_NUM 23 #define PCLK_GPIO_NUM 22 camera_fb_t * fb = NULL; using namespace websockets; WebsocketsServer WSserver; //AsyncWebServer webserver(8888); AsyncWebServer webserver(80); // Arduino like analogWrite // value has to be between 0 and valueMax void ledcAnalogWrite(uint8_t channel, uint32_t value, uint32_t valueMax = 180) { // calculate duty, 8191 from 2 ^ 13 - 1 uint32_t duty = (8191 / valueMax) * min(value, valueMax); ledcWrite(channel, duty); } void setup() { WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector Serial.begin(115200); // Ai-Thinker: pins 2 and 1, Laserpointer: pin 12 ledcSetup(2, 50, 16); //channel, freq, resolution ledcAttachPin(2, 2); // pin, channel ledcSetup(4, 50, 16); ledcAttachPin(4, 1); pinMode(12, OUTPUT); camera_config_t config; config.ledc_channel = LEDC_CHANNEL_0; config.ledc_timer = LEDC_TIMER_0; config.pin_d0 = Y2_GPIO_NUM; config.pin_d1 = Y3_GPIO_NUM; config.pin_d2 = Y4_GPIO_NUM; config.pin_d3 = Y5_GPIO_NUM; config.pin_d4 = Y6_GPIO_NUM; config.pin_d5 = Y7_GPIO_NUM; config.pin_d6 = Y8_GPIO_NUM; config.pin_d7 = Y9_GPIO_NUM; config.pin_xclk = XCLK_GPIO_NUM; config.pin_pclk = PCLK_GPIO_NUM; config.pin_vsync = VSYNC_GPIO_NUM; config.pin_href = HREF_GPIO_NUM; config.pin_sscb_sda = SIOD_GPIO_NUM; config.pin_sscb_scl = SIOC_GPIO_NUM; config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM; config.xclk_freq_hz = 20000000; config.pixel_format = PIXFORMAT_JPEG; //init with high specs to pre-allocate larger buffers if (psramFound()) { config.frame_size = FRAMESIZE_UXGA; config.jpeg_quality = 10; config.fb_count = 2; } else { config.frame_size = FRAMESIZE_SVGA; config.jpeg_quality = 12; config.fb_count = 1; } // camera init esp_err_t err = esp_camera_init(&config); if (err != ESP_OK) { Serial.printf("Camera init failed with error 0x%x", err); return; } sensor_t * s = esp_camera_sensor_get(); s->set_framesize(s, FRAMESIZE_QVGA); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); // Wait for connection while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.print("Connected to "); Serial.print("IP address: "); Serial.println(WiFi.localIP()); webserver.on("/", HTTP_GET, [](AsyncWebServerRequest * request) { AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", index_html_gz, sizeof(index_html_gz)); response->addHeader("Content-Encoding", "gzip"); request->send(response); }); webserver.begin(); WSserver.listen(82); } //Drawing Circle used subfunction convert to moter coordinate int convert2motor(int orgCo) { int temp; temp = orgCo / 10 + 90; return temp; } //Drawing part of Circle, divid a cirlce into 4 zones void partOfCircle(int degStart, int degEnd) { int deg; int x; int y; int r=100; double pi = 3.14; for (deg = degStart; deg < degEnd; ++deg) { x = convert2motor(r *cos(deg*pi/180)); y = convert2motor(r *sin(deg*pi/180)); Serial.print ( x); Serial.print ( ","); Serial.println ( y); ledcAnalogWrite(2, x); // channel, value ledcAnalogWrite(4, y); // wait for the servo to get there delay(10); } } //Drawing whole circle void Circle() { //int circleIndex = msg.data().indexOf('circle:'); //int circleClick = msg.data().substring(0, circleIndex+1).toInt(); // If circleClick == 1, start to draw circle //if (circleClick ==1) // { //cout << "draw zone 1" << endl; partOfCircle(1,90); //zone 1 //cout << "draw zone 2" << endl; partOfCircle(91,180); //zone 2 //cout << "draw zone 3"<< endl; partOfCircle(181,270); //zone 3 //cout << "draw zone 4"<< endl; partOfCircle(270,360); //zone 4 //} } void handle_message(WebsocketsMessage msg) { int commaIndex = msg.data().indexOf(','); int panValue = msg.data().substring(1, commaIndex).toInt(); int tiltValue = msg.data().substring(commaIndex + 1).toInt(); Serial.println ("Start to handle message"); Serial.println (msg.data()[0]); Serial.println ("check panDegrees and tiltdegree: "+msg.data()); char msgHead = msg.data()[0]; /* if (panValue == 999 || panValue === -999) { panValue > 900 ? digitalWrite(12, LOW) : digitalWrite(12, HIGH); }*/ //C is on laser if (msgHead=='C') { Serial.println ("msgHead==C"); Serial.println ("On laser"); digitalWrite(12, LOW); } //D is off laser else if (msgHead=='D') { Serial.println ("msgHead==D"); Serial.println ("Off laser"); digitalWrite(12, HIGH); } else if ( msgHead=='A') { Serial.println ("Start to move laser pointer manually"); Serial.println ("before mapping panDegrees: "+panValue); Serial.println ("before mapping tiltValue: "+tiltValue); panValue = map(panValue, -90, 90, 0, 180); // 0-180 tiltValue = map(tiltValue, -90, 90, 180, 0); // 0-180 reversed Serial.println ("after mapping panDegrees: "+panValue); Serial.println ("after mapping tiltValue: "+tiltValue); ledcAnalogWrite(2, panValue); // channel, value ledcAnalogWrite(4, tiltValue); } else if ( msgHead=='B') { Serial.println ("Start to draw circle"); Serial.println ("On laser"); digitalWrite(12, LOW); Circle(); Serial.println ("Off laser"); digitalWrite(12, HIGH); Serial.println ("Finish to draw circle"); } } void loop() { /* Serial.print("start to draw"); Circle(); Serial.print("end to draw"); */ auto client = WSserver.accept(); client.onMessage(handle_message); while (client.available()) { client.poll(); fb = esp_camera_fb_get(); client.sendBinary((const char *)fb->buf, fb->len); esp_camera_fb_return(fb); fb = NULL; } }