This file contains hidden or 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
// Arduitronics.com | |
long phTot; | |
float phAvg; | |
int i; | |
float m = (7-9.18)/(563-513); // Slope of straight line (Y = mx + C) | |
float C = 7-m*(563); //Constant of straight line (Y = mx + C) | |
void setup() { | |
Serial.begin(9600); |
This file contains hidden or 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
/******************************************************************************* | |
* Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman | |
* | |
* Permission is hereby granted, free of charge, to anyone | |
* obtaining a copy of this document and accompanying files, | |
* to do whatever they want with them without any restriction, | |
* including, but not limited to, copying, modification and redistribution. | |
* NO WARRANTY OF ANY KIND IS PROVIDED. | |
* | |
* This example sends a valid LoRaWAN packet with payload "Hello, |
This file contains hidden or 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 <ArduinoJson.h> // ** | |
#include <ESP8266WiFi.h> | |
#include <MicroGear.h> | |
float sensorValue = 0.1; | |
const int sleepTimeS = 30*60; // second | |
//------------------------------------------------------- | |
const char* ssid = "GJ Tech_xxxx"; | |
const char* password = "xxxxxxxx"; |
This file contains hidden or 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 <ESP8266WiFi.h> | |
int holdPin = 0; // defines GPIO 0 as the hold pin (will hold CH_PD high untill we power down). | |
int pirPin = 12; // defines GPIO 12 as the PIR read pin (reads the state of the PIR output). | |
int pir = 1; // sets the PIR record (pir) to 1 (it must have been we woke up). | |
void setup() { | |
pinMode(holdPin, OUTPUT); // sets GPIO 0 to output | |
digitalWrite(holdPin, HIGH); // sets GPIO 0 to high (this holds CH_PD high even if the PIR output goes low) |
This file contains hidden or 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 our GFX example for the Adafruit ILI9341 Breakout and Shield | |
----> http://www.adafruit.com/products/1651 | |
Check out the links above for our tutorials and wiring diagrams | |
These displays use SPI to communicate, 4 or 5 pins are required to | |
interface (RST is optional) | |
Adafruit invests time and resources providing this open source code, | |
please support Adafruit and open-source hardware by purchasing | |
products from Adafruit! |
This file contains hidden or 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
// ตัวอย่างการใช้งาน Arduino MKR 1010 Wifi ดึงข้อมูลจาก website แบบ SSL | |
// โดย Arduitronics.com : Mountain A | |
// Data from https://www.tmd.go.th/en/province.php?StationNumber=48455 | |
/*______Import Libraries_______*/ | |
#include <SPI.h> | |
#include <WiFiNINA.h> | |
#include <ArduinoHttpClient.h> | |
#include "Adafruit_GFX.h" | |
#include "Adafruit_ILI9341.h" |
This file contains hidden or 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 our GFX example for the Adafruit ILI9341 Breakout and Shield | |
----> http://www.adafruit.com/products/1651 | |
Check out the links above for our tutorials and wiring diagrams | |
These displays use SPI to communicate, 4 or 5 pins are required to | |
interface (RST is optional) | |
Adafruit invests time and resources providing this open source code, | |
please support Adafruit and open-source hardware by purchasing | |
products from Adafruit! |
This file contains hidden or 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 Arduino example demonstrates bidirectional operation of a | |
// 28BYJ-48, using a ULN2003 | |
// interface board to drive the stepper. The 28BYJ-48 motor is a 4- | |
// phase, 8-beat motor, geared down by a factor of 68. One bipolar | |
// winding is on motor pins 1 & 3 and the other on motor pins 2 & 4. |
This file contains hidden or 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
//Arduino 1.0+ only | |
#include <Wire.h> | |
#define CTRL_REG1 0x20 | |
#define CTRL_REG2 0x21 | |
#define CTRL_REG3 0x22 | |
#define CTRL_REG4 0x23 | |
#define CTRL_REG5 0x24 | |
int L3G4200D_Address = 105; //I2C address of the L3G4200D | |
int x; | |
int y; |
This file contains hidden or 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
// Example Sketch by Arduitronics.com for testing GY-30 Module | |
// Ambient Light sensor -- GY-30 | |
// Feb 22, 2014 | |
// By Mountain A | |
#include <Wire.h> //BH1750 IIC Mode | |
#include <math.h> | |
//int BH1750address = 0x5C; // ADDR -> VCC Measurement with L-Resolution Mode | |
int BH1750address = 0x23; // ADDR -> GND Measurement with H-Resolution Mode2 |
NewerOlder