This file contains 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 <WiFi.h> | |
#include "time.h" | |
const char* ntpServer1 = "time.google.com"; | |
const char* time_zone = "IST-5:30"; | |
const uint8_t CLK_CYCLE_DELAY = 100;// us | |
const uint8_t CLK_PIN = 22; | |
const uint8_t DIO_PIN = 19; | |
const uint8_t NUM_DIGITS = 4; |
This file contains 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 <WiFi.h> | |
#include <WiFiClient.h> | |
#include <WebServer.h> | |
const uint8_t CLK_CYCLE_DELAY = 100;// us | |
const uint8_t CLK_PIN = 22; | |
const uint8_t DIO_PIN = 19; | |
const uint8_t NUM_DIGITS = 4; | |
const char* ssid = "****"; | |
const char* password = "****"; |
This file contains 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 "TFT_eSPI.h" | |
#include "rpcWiFi.h" | |
#include "WiFiClientSecure.h" | |
#include "HTTPClient.h" | |
#include "ArduinoJson.h" | |
DynamicJsonDocument jsonResponse(1024); | |
const char *ssid = "m1Danger"; | |
const char *password = "abivarsh@2016"; | |
const String checkUrl = "https://api.freshping.io/v1/public-check-statuses/524828/"; |
This file contains 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
void remove_all_bonded_devices(void) | |
{ | |
int dev_num = esp_ble_get_bond_device_num(); | |
esp_ble_bond_dev_t *dev_list = (esp_ble_bond_dev_t *)malloc(sizeof(esp_ble_bond_dev_t) * dev_num); | |
esp_ble_get_bond_device_list(&dev_num, dev_list); | |
for (int i = 0; i < dev_num; i++) { | |
esp_ble_remove_bond_device(dev_list[i].bd_addr); | |
} | |
free(dev_list); |
This file contains 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
void setup() { | |
Serial.begin(9600); | |
pinMode(LED_BUILTIN, OUTPUT); | |
} | |
void loop() { | |
int cmd = Serial.parseInt(); | |
if(cmd == 1){ | |
digitalWrite(LED_BUILTIN, HIGH); | |
}else if (cmd == -1){ | |
digitalWrite(LED_BUILTIN, LOW); |
This file contains 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
#define KEYBOARD_ENABLE_CONTROL PB2 | |
#define LDR_PIN PA4 | |
#define LDR_OBSTACLE_THRESHOLD 980 | |
#include "Keyboard.h" | |
void setup() { | |
Serial.begin(115200); | |
pinMode(LDR_PIN,INPUT); | |
pinMode(KEYBOARD_ENABLE_CONTROL,INPUT); |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:path/path.dart'; | |
import 'package:image_picker/image_picker.dart'; | |
import 'dart:io'; | |
import 'dart:async'; | |
import 'package:dio/dio.dart'; | |
/** | |
* accepts two parameters,the endpoint and the file |
This file contains 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
import 'package:path/path.dart'; | |
import 'dart:io'; | |
import 'dart:async'; | |
import 'package:dio/dio.dart'; | |
/** | |
* accepts two parameters,the endpoint and the file | |
* returns Response from server | |
*/ | |
Future<Response> sendFile(String url, File file) async { |
This file contains 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
import 'package:path/path.dart'; | |
import 'dart:io'; | |
import 'dart:async'; | |
import 'package:dio/dio.dart'; | |
/** | |
* accepts three parameters, the endpoint, formdata (except fiels),files (key,File) | |
* returns Response from server | |
*/ | |
Future<Response> sendForm( |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:path/path.dart'; | |
import 'package:image_picker/image_picker.dart'; | |
import 'dart:io'; | |
import 'dart:async'; | |
import 'package:dio/dio.dart'; | |
/** | |
* accepts three parameters, the endpoint, formdata (except fiels),files (key,File) | |
* returns Response from server |
NewerOlder