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 MY_ADC_SAMPLING_TIME ADC_SampleTime_239Cycles5 | |
uint8_t My_adcInitFirstTime = true; | |
uint8_t My_adcChannelConfigured = NONE; | |
PinMode My_digitalPinModeSaved = (PinMode)NONE; | |
void My_ADCInit() | |
{ | |
ADC_InitTypeDef ADC_InitStructure; |
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 <math.h> | |
#define MAXTIMINGS 85 | |
#define cli noInterrupts | |
#define sei interrupts | |
#define DHT11 11 | |
#define DHT22 22 | |
#define DHT21 21 |
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 <math.h> | |
class Thermistor { | |
private: | |
int _pin; | |
int _resistor; | |
int _temp_raw; | |
float _temp_k; | |
float _temp_c; | |
float _temp_f; |
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 MAXTIMINGS 85 | |
#define cli noInterrupts | |
#define sei interrupts | |
#define DHT11 11 | |
#define DHT22 22 | |
#define DHT21 21 | |
#define AM2301 21 |
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
#ifndef OneWire_h | |
#define OneWire_h | |
#include <inttypes.h> | |
// you can exclude onewire_search by defining that to 0 | |
#ifndef ONEWIRE_SEARCH | |
#define ONEWIRE_SEARCH 1 | |
#endif | |
// You can exclude CRC checks altogether by defining this to 0 |
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
#ifndef CONFIGURATION_H | |
#define CONFIGURATION_H | |
// This configuration file contains the basic settings. | |
// Advanced settings can be found in Configuration_adv.h | |
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration | |
//=========================================================================== | |
//============================= DELTA Printer =============================== | |
//=========================================================================== |
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 ddl = 0; // Ding dong last millis() | |
int btnpin = D0; // "Button" pin | |
const int ddd = 15000; // Time until button can be activated again | |
void setup() { | |
pinMode(btnpin, INPUT_PULLUP); | |
RGB.control(true); | |
} |
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 a simple "sketch" that calls a web page when a button is pressed. It is a proof-of-concept | |
* for my boss and hastily written in about 2 hours. The remote URL is a PHP script that handles | |
* making the API calls to a remote SMS-messaging service. | |
* | |
* I'm sure it could make use of interrupts somehow, but I'm not sure how off the top of my head. | |
* | |
* It uses the onboard RGB LED as status display: | |
* - Red = Waiting to be pressed | |
* - Green = Making HTTP request |
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 "DHT22.h" | |
DHT::DHT(uint8_t pin, uint8_t type, uint8_t count) { | |
_pin = pin; | |
_type = type; | |
_count = count; | |
firstreading = true; | |
_next_read_millis = 0; | |
_next_read_step = 1; | |
} |
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
/* Elapsed time types - for easy-to-use measurements of elapsed time | |
* http://www.pjrc.com/teensy/ | |
* Copyright (c) 2011 PJRC.COM, LLC | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
OlderNewer