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 <Adafruit_NeoPixel.h> | |
const int LED_PIN = 6; | |
const int TACH_PIN = 2; | |
const int BRIGHTNESS = 100; | |
const int LED_COUNT = 80; | |
const int REDLINE = 7500; | |
const int WARN_RPM = 6000; | |
const int WARN_INTERVAL = 70; |
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
//Miata shift light! | |
// Ignition frequency is equal to RPM/30 | |
//initialize libraries | |
#include <Bounce2.h> | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif |
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
/* | |
Heavily modified from below code - works with NEOPIXEL 24 pos ring and M2 hardware. | |
Program Name: blueShift | |
Version: v0.7 | |
Author: Pete Mills | |
Website: petemills.blogspot.com | |
Email: mills.pete@gmail.com |
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 "SamNonDuePin.h" | |
const int LPC = PIN_EMAC_ERX0; // LOW POWER CONTROL pin | |
const int PWM_nVPW = PIN_EMAC_EMDC; // PWM/VPW level control | |
void setup() { | |
pinModeNonDue(LPC, OUTPUT); | |
pinModeNonDue(PWM_nVPW, OUTPUT); | |
digitalWriteNonDue(LPC, HIGH); // LOW = no power at +12V_SW/+5V_SW |
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 "SamNonDuePin.h" | |
const int LPC = PIN_EMAC_ERX0; // LOW POWER CONTROL pin | |
void setup() { | |
pinModeNonDue(LPC, OUTPUT); | |
digitalWriteNonDue(LPC, LOW); // LOW = no power at +12V_SW/+5V_SW | |
// HIGH = power at +12V_SW/+5V_SW | |
} |
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
/* | |
Fade | |
Modified 6/6/16 to demonstrate Macchina 2.0 RGB LEDs, | |
also functioning as a HELLO WORLD type sketch. | |
This example shows how to fade an LED on the RGB LED | |
using the analogWrite() function. | |
The analogWrite() function uses PWM, so if |
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
#define MASTER_CLOCK 84000000 | |
#include "SamNonDuePin.h" | |
uint32_t clock_a = 42000000; // Sampling frequency in Hz | |
int brightness = 0; // how bright the LED is | |
int fadeAmount = 5; // how many points to fade the LED by | |
const int IOENABLE = 6; // the number of the 12Vio_EN pin |
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
package com.madebyatomicrobot.things | |
import android.app.Activity | |
import android.os.Bundle | |
import android.util.Log | |
import android.widget.SeekBar | |
import android.widget.SeekBar.OnSeekBarChangeListener | |
import android.widget.TextView | |
import com.google.android.things.pio.PeripheralManagerService | |
import com.google.android.things.pio.UartDevice |
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 "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