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 example of sending CAN messages with 11bit id's | |
// | |
// https://matthewcmcmillan.blogspot.com | |
// Twitter: @matthewmcmillan | |
// | |
#include "mcp_can.h" | |
#include <SPI.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
///////////////////////////////////////////////////////////////////// | |
// This is a simple example of sending CAN messages with 29bit id's | |
// | |
// https://matthewcmcmillan.blogspot.com | |
// Twitter: @matthewmcmillan | |
// | |
#include "mcp_can.h" | |
#include <SPI.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
/* | |
Started with example code written by Nathan Seidle from SparkFun Electronics and added | |
LCD output with gram and ounce values. | |
Setup your scale and start the sketch WITHOUT a weight on the scale | |
Once readings are displayed place the weight on the scale | |
Press +/- or a/z to adjust the calibration_factor until the output readings match the known weight | |
Arduino pin 6 -> HX711 CLK | |
Arduino pin 5 -> HX711 DOUT |
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
// Matthew McMillan | |
// @matthewmcmillan | |
// http://matthewcmcmillan.blogspot.com | |
// | |
// Digital speedometer that uses a TM1637 type display | |
// | |
// Code is written for an Arduino UNO | |
// | |
// VSS on car connects to digital pin 5 | |
// CLK on display to digital pin 3 |
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 "Nextion.h" | |
const int lightPin = 0; | |
const int hardwareCounterPin = 5; | |
const int samplePeriod = 1000; //in milliseconds | |
const float pulsesPerMile = 4000; | |
const float convertMph = pulsesPerMile/3600; | |
unsigned int count; | |
float mph; |
OlderNewer