Skip to content

Instantly share code, notes, and snippets.

void SendN2KTransmissionParam() {
static unsigned long TransmissionUpdated=millis();
tN2kMsg N2kMsg;
if (TransmissionUpdated+TransmissionUpdatePeriod<millis()) {
TransmissionUpdated=millis();
SetN2kTransmissionParameters(N2kMsg,1,N2kTG_Forward,TransmissionOilPressure(),
TransmissionOilTemperature(),0x0);
NMEA2000.SendMsg(N2kMsg);
}
}
int sensorPin = A0;
int model = 2245;
double voltageLow = 1.05;
double voltageHigh = 4.88;
bool debugMode = true;
inline double PSIToPascal(double v) { return v*6894; }
void setup() {
pinMode(sensorPin, INPUT);
}
2.59V R_th = 10770.79Ohm - T =23.32C
2.59V R_th = 10770.79Ohm - T =23.32C
2.59V R_th = 10770.79Ohm - T =23.32C
2.59V R_th = 10770.79Ohm - T =23.32C
2.60V R_th = 10813.01Ohm - T =23.23C
2.60V R_th = 10813.01Ohm - T =23.23C
2.60V R_th = 10813.01Ohm - T =23.23C
2.60V R_th = 10813.01Ohm - T =23.23C
2.60V R_th = 10813.01Ohm - T =23.23C
2.60V R_th = 10813.01Ohm - T =23.23C
// which analog pin to connect
#define THERMISTORPIN A0
// resistance at 25 degrees C
#define THERMISTORNOMINAL 10000
// temp. for nominal resistance (almost always 25 C)
#define TEMPERATURENOMINAL 25
// how many samples to take and average, more takes longer
// but is more 'smooth'
#define NUMSAMPLES 5
// The beta coefficient of the thermistor (usually 3000-4000)
#include <math.h>
#define READING_PIN 0
double R1 = 10000; //resistance put in parallel
double V_IN = 5.0;
double A = 1.129148e-3;
double B = 2.34125e-4;
double C = 8.76741e-8;
double K = 9.5; // mW/dec C – dissipation factor
/*
Physical Pixel
An example of using the Arduino board to receive data from the
computer. In this case, the Arduino boards turns on an LED when
it receives the character 'H', and turns off the LED when it
receives the character 'L'.
The data can be sent from the Arduino serial monitor, or another
program like Processing (see code below), Flash (via a serial-net
@sixstringsg
sixstringsg / physicalpixel.ino
Created December 2, 2015 02:04
Modified script to turn sprinklers off after a set amount of time
/*
Physical Pixel
An example of using the Arduino board to receive data from the
computer. In this case, the Arduino boards turns on an LED when
it receives the character 'H', and turns off the LED when it
receives the character 'L'.
The data can be sent from the Arduino serial monitor, or another
program like Processing (see code below), Flash (via a serial-net
/*********************************************************************
** Description: **
** This file is a sample code for your reference. **
** **
** Copyright (C) 2011 ElecFreaks Corp. **
** Created by ElecFreaks Robi.W /29 Sep 2011 **
** **
** http://elecfreaks.taobao.com **
*********************************************************************/
#include <NewSoftSerial.h>
---- Minecraft Crash Report ----
// Oh - I know what I did wrong!
Time: 1/5/15 1:55 PM
Description: Ticking block entity
java.lang.NoSuchMethodError: buildcraft.api.mj.MjAPI.getMjBattery(Ljava/lang/Object;)Lbuildcraft/api/mj/IBatteryObject;
at mekanism.common.util.CableUtils.isEnergyAcceptor(CableUtils.java:56)
at mekanism.common.util.CableUtils.getConnections(CableUtils.java:114)
at mekanism.common.util.CableUtils.emit(CableUtils.java:226)
D/PIANOBAR!( 3294): @@@ APP CREATED
D/PIANOBAR!( 3294): &&& CREATING RECEIVER
D/PIANOBAR!( 3294): quality: highQuality
D/PIANOBAR!( 3294): download: 2
D/PIANOBAR!( 3294): Pandora One: true
D/PIANOBAR!( 3294): stationId: 1023632591027369072
D/PIANOBAR!( 3294): **** BROADCAST: Application->Service - START
D/PIANOBAR!( 3294): @@@ APP RESUMED
D/PIANOBAR!( 3294): **** BROADCAST: Application->Service - RESUME
D/PIANOBAR!( 3310): isConnected: true