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
#![no_std] | |
#![no_main] | |
use cortex_m::peripheral; | |
use cortex_m_rt::entry; | |
use panic_halt as _; | |
use stm32f3xx_hal::{pac, delay, prelude::*}; | |
#[entry] | |
fn main() -> ! { |
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
/******************************************************************************* | |
* 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 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
/* | |
For the Riffle Datalogger | |
Sketch logs the Temperature and Humidity from a SHT21 sensor | |
at an interval. | |
It uses the RTC as a scheduler by using an Alarm and Interrupt | |
pin to wake up the ATmega at an interval. | |
It logs to the SD card and outputs time and values in the Serial | |
Monitor | |
This Sketch uses the SdFat.h library instead of the SD.h library that is |
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
/*HCHOtest1.0.ino | |
Barebones sketch to read an analog voltage between 0 and 100mV. | |
An internal reference voltage of 1.1v is used to scale the digital conversion. | |
The maximum output of the HCHO sensor (typically 100mV) is converted to a value of 103. | |
This value of 103 should equal a reading of 1000ppb HCHO. | |
If the maximum output of the sensor is greater than 100mV, a reading of greater than 1000ppb is posible. | |
*/ | |
int analogPin = 3; // Tip of output HCHO sensor jack connected to analog pin 3 | |
// Ring of HCHO sensor connector connected to GND |
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 "Time.h" | |
int ledsec1_1 = 12; | |
int ledsec1_2 = 11; | |
int ledsec1_4 = 10; | |
int ledsec1_8 = 9; | |
int ledsec2_1 = 8; | |
int ledsec2_2 = 7; | |
int ledsec2_4 = 6; |
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 "Time.h" | |
// read this: https://github.com/PaulStoffregen/Time/blob/master/examples/TimeSerial/TimeSerial.ino | |
// read this: https://codebender.cc/library/Time#Time.h | |
// ask me about what doesn't make sense. | |
//void setTime(int hr,int min,int sec,int day, int month, int yr); | |
void setup() { | |
Serial.begin(9600); | |
setTime(21,29,00,21,03,2018); //hour, minute, second, day, month, year |
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 led1 = 9; | |
int led2 = 10; | |
int led4 = 11; | |
int led8 = 12; | |
//...etc | |
void setup() { | |
pinMode(led1, OUTPUT); | |
pinMode(led2, OUTPUT); | |
//...etc |
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
bool write_to_sd = false; | |
if (radio.receiveDone()) | |
{ | |
Serial.println(radio.SENDERID); | |
if (radio.SENDERID == 2) { | |
write_to_sd = true; | |
} | |
rtc.update(); | |
printTime(); | |
if (radio.ACKRequested()) { |
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 <RFM69.h> //get it here: https://www.github.com/lowpowerlab/rfm69 | |
#include <RFM69_ATC.h> | |
#include "Arduino.h" | |
// Use the external SPI SD card as storage | |
#include <SPI.h> | |
#include <SD.h> | |
//********************************************************************************************* | |
// *********** IMPORTANT SETTINGS - YOU MUST CHANGE/ONFIGURE TO FIT YOUR HARDWARE ************* |
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
/* | |
SHT2x - A Humidity Library for Arduino. | |
Supported Sensor modules: | |
SHT21-Breakout Module - http://www.moderndevice.com/products/sht21-humidity-sensor | |
SHT2x-Breakout Module - http://www.misenso.com/products/001 | |
Created by Christopher Ladden at Modern Device on December 2009. | |
Modified by Paul Badger March 2010 |
NewerOlder