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 daikin_freq 37 | |
#define daikin_data 27 | |
int count = 0; | |
byte delay_low = 0; | |
byte ir_byte_no = 0; | |
byte ir_header = 0; | |
byte ir_state = 0; | |
char IR_data[daikin_data + 1] = | |
{0x11,0xDA,0x27,0xF0,0x00,0x00,0x00,0x20, | |
//0 1 2 3 4 5 6 7 byte 7 sum |
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 "DHT.h" | |
#include <OneWire.h> | |
#include <ESP8266WiFi.h> | |
#define DS18x20_PIN 4 | |
#define DHTPIN 12 // what pin we're connected to | |
#define DHTTYPE DHT22 // DHT 22 (AM2302) |
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
........ | |
All text above, and the splash screen must be included in any redistribution | |
********************************************************************* | |
//#include <SPI.h> //<< comment เราใช้ i2c ครับ | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
//#include <Adafruit_SSD1306.h> | |
#include <ESP_Adafruit_SSD1306.h> //<< เรียกใช้ lib ที่เราแก้แล้วแทน |
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
/********************************************************************* | |
This is an example for our Monochrome OLEDs based on SSD1306 drivers | |
Pick one up today in the adafruit shop! | |
------> http://www.adafruit.com/category/63_98 | |
This example is for a 128x64 size display using I2C to communicate | |
3 pins are required to interface (2 I2C and one reset) | |
Adafruit invests time and resources providing this open source code, |
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 "nrf_esb.h" | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include "nrf_gpio.h" | |
#include "nrf_adc.h" | |
#include "twi_master.h" | |
#include "mpu6050.h" | |
#include "nrf_delay.h" | |
#include "app_pwm.h" | |
#include "app_error.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
%%%% %%%% | |
function [ Lu, Ll, thata_max_min ] = fn_find_Aui_Ali (motor_angle, b_size, e_size, Wr, Wp) | |
r_ws = Wr; | |
xs = Wp(1); | |
ys = Wp(2); | |
zs = Wp(3); | |
r_b = b_size-e_size; | |
gramma = motor_angle; | |
%% thata are angle from minimum maximan | |
thata = atan2(zs,(-r_b+xs*cosd(gramma)+ys*sind(gramma))) /pi*180 |
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 _mode_position now_state_of_plant._mode_position | |
#define _mode now_state_of_plant._mode | |
#define _sub_1 now_state_of_plant._sub_1 | |
#define _sub_2 now_state_of_plant._sub_2 | |
#define _sub_3 now_state_of_plant._sub_3 | |
struct mem_state | |
{ | |
uint16_t _writed_count; |
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
/* Create a WiFi access point and provide a web server on it. */ | |
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
// #include <ESP8266WebServer.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <ESP_Adafruit_SSD1306.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
/** | |
****************************************************************************** | |
* File Name : main.c | |
* Description : Main program body | |
****************************************************************************** | |
* | |
* COPYRIGHT(c) 2015 STMicroelectronics | |
* | |
* Redistribution and use in source and binary forms, with or without modification, | |
* are permitted provided that the following conditions are met: |
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
/* FreqMeasure - Example with serial output | |
http://www.pjrc.com/teensy/td_libs_FreqMeasure.html | |
This example code is in the public domain. | |
*/ | |
#include <FreqMeasure.h> | |
int RPM = 0; | |
unsigned long time_now, time_prev_rpm, time_prev_temp; |