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 <SoftwareSerial.h> | |
SoftwareSerial pmsSerial(2, 3); | |
void setup() { | |
// our debugging output | |
Serial.begin(115200); | |
// sensor baud rate is 9600 | |
pmsSerial.begin(9600); | |
} | |
struct pms5003data { | |
uint16_t framelen; |
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
// On Leonardo/Micro or others with hardware serial, use those! | |
// uncomment this line: | |
// #define pmsSerial Serial1 | |
// For UNO and others without hardware serial, we must use software serial... | |
// pin #2 is IN from sensor (TX pin on sensor), leave pin #3 disconnected | |
// comment these two lines if using hardware serial | |
#include <SoftwareSerial.h> | |
SoftwareSerial pmsSerial(2, 3); | |
void setup() { | |
// our debugging output |
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 example connects to a WEP-encrypted Wifi network. | |
Then it prints the MAC address of the Wifi module, | |
the IP address obtained, and other network details. | |
If you use 40-bit WEP, you need a key that is 10 characters long, | |
and the characters must be hexadecimal (0-9 or A-F). | |
e.g. for 40-bit, ABBADEAF01 will work, but ABBADEAF won't work | |
(too short) and ABBAISDEAF won't work (I and S are not |
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 <SoftwareSerial.h> | |
#include "ThingSpeak.h" | |
#include <WiFiNINA.h> | |
SoftwareSerial pmsSerial(2, 3); | |
// Use this file to store all of the private credentials | |
// and connection details | |
//#define SECRET_SSID "HUAWEI Mate 9" // replace MySSID with your WiFi network name | |
//#define SECRET_PASS "g4265184" // replace MyPassword with your WiFi password |
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 <PZEM004Tv30.h> | |
PZEM004Tv30 pzem(11, 12); | |
void setup() { | |
Serial.begin(115200); | |
} | |
void loop() { | |
float voltage = pzem.voltage(); | |
if(voltage != NAN){ | |
Serial.print(“Voltage: “); Serial.print(voltage); Serial.println(“V”); | |
} |
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" | |
#include "HTTPSRedirect.h" | |
#include "DebugMacros.h" | |
#include <PZEM004Tv30.h> | |
String sheetVolt = ""; | |
String sheetCurrent = ""; | |
String sheetPower = ""; | |
String sheetEnergy = ""; | |
String sheetFrequency = ""; |
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
// Created by Sujay S. Phadke, 2017 | |
// All Rights Reserved. | |
// Github: https://github.com/electronicsguy | |
// | |
// Read/Write to Google Sheets using REST API. | |
// Can be used with ESP8266 & other embedded IoT devices. | |
// | |
// Use this file with the ESP8266 library HTTPSRedirect | |
// | |
// doGet() and doPost() need the spreadsheet ID. Cannot use "active spreadsheet" here since |
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
/******************************************************************************** | |
* ADXL345 Library Examples- pitch_roll.ino * | |
* * | |
* Copyright (C) 2012 Anil Motilal Mahtani Mirchandani(anil.mmm@gmail.com) * | |
* * | |
* License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> * | |
* This is free software: you are free to change and redistribute it. * | |
* There is NO WARRANTY, to the extent permitted by law. * | |
* * | |
*********************************************************************************/ |
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
/* | |
LiquidCrystal Library - "Hello !!!! Arduitronics" | |
Demonstrates the use a 16x2 LCD display. The LiquidCrystal | |
library works with all LCD displays that are compatible with the | |
Hitachi HD44780 driver. There are many of them out there, and you | |
can usually tell them by the 16-pin interface. | |
This sketch prints "Hello !!!! Arduitronics" to the LCD | |
and shows the time. | |
The circuit: | |
* LCD RS pin to digital pin 8 |
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
//Sample using LiquidCrystal library | |
#include <LiquidCrystal.h> | |
/******************************************************* | |
This program will test the LCD panel and the buttons | |
Mark Bramwell, July 2010 | |
********************************************************/ | |
// select the pins used on the LCD panel | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
// define some values used by the panel and buttons | |
int lcd_key = 0; |
OlderNewer