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 "Arduino.h" | |
#include <WiFi.h> | |
#include "esp_log.h" | |
#include "esp_system.h" | |
#include "esp_event.h" | |
#include "mqtt_client.h" | |
#define SECURE_MQTT // Comment this line if you are not using MQTT over SSL | |
#ifdef SECURE_MQTT |
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
[DeviceList] | |
%PI_CDC_PICO%=DriverInstall, USB\VID_2E8A&PID_0005&MI_00 | |
[DeviceList.NTAMD64] | |
%PI_CDC_PICO%=DriverInstall, USB\VID_2E8A&PID_0005&MI_00 | |
[DeviceList.NTIA64] | |
%PI_CDC_PICO%=DriverInstall, USB\VID_2E8A&PID_0005&MI_00 | |
[DeviceList.NT] |
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
[env:due] | |
platform = atmelsam | |
board = due | |
framework = arduino | |
monitor_speed = 115200 | |
;upload_speed = 115200 | |
debug_build_flags = -O1 -ggdb3 -g3 ;//Resolve compile issue | |
debug_tool = custom ;//j-link segger in SWD mode |
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
double mapf(double val, double in_min, double in_max, double out_min, double out_max) { | |
return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
} |
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
int a,b,c,d; | |
int i; | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
for(i = 0; i < 16 ; i++) | |
{ |
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
/* | |
open browser and hit | |
192.168.1.167/?1 to ON | |
192.168.1.167/?0 to OFF | |
*/ | |
#include <ESP8266WiFi.h> |
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
/* | |
__DATE__ The current date as a character literal in "MMM DD YYYY" format. | |
__TIME__ The current time as a character literal in "HH:MM:SS" format. | |
__FILE__ This contains the current filename as a string literal. | |
__LINE__ This contains the current line number as a decimal constant. | |
__STDC__ Defined as 1 when the compiler complies with the ANSI standard. | |
*/ | |
#include <stdio.h> |
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 <stdio.h> | |
int main() | |
{ | |
int marks[10]={0,1,2,3,4,5,6,7,8,9},i; | |
for(i=0; i<11; ++i) | |
{ | |
printf("%d ",marks[i]); | |
} | |
while(1) | |
{ |