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
#!/usr/bin/python | |
import Image | |
import ImageDraw | |
import ImageFont | |
import glob | |
import Adafruit_BBIO.ADC as ADC | |
import time |
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 "SPI.h" | |
#include "Adafruit_GFX.h" | |
#include "Adafruit_ILI9340.h" | |
#if defined(__SAM3X8E__) | |
#undef __FlashStringHelper::F(string_literal) | |
#define F(string_literal) string_literal | |
#endif | |
// These are the pins used for the Mega |
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
///////////////////////////////////////////////////////////////////// | |
// 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
#!/usr/bin/python | |
########################################## | |
# https://matthewcmcmillan.blogspot.com | |
# Twitter: @matthewmcmillan | |
# | |
# For the most up to date version of this file see: | |
# https://github.com/matt448/Digital_Dash_v2/blob/master/serialtest.py | |
# |
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 "SPI.h" | |
#include "Adafruit_GFX.h" | |
#include "Adafruit_ILI9340.h" | |
#include <SD.h> | |
#if defined(__SAM3X8E__) | |
#undef __FlashStringHelper::F(string_literal) | |
#define F(string_literal) string_literal | |
#endif |
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 | |
// | |
// VSS on car connects to pin 5 | |
// CLK on display to Analog pin 5 | |
// DAT on display to Analog pin 4 | |
// |
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
// demo: CAN-BUS Shield, receive data | |
#include "mcp_can.h" | |
#include <SPI.h> | |
#include <LiquidCrystal.h> | |
#include <stdio.h> | |
#define INT8U unsigned char | |
INT8U Flag_Recv = 0; | |
INT8U len = 0; | |
INT8U buf[8]; |
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; |