Skip to content

Instantly share code, notes, and snippets.

@pingud98
pingud98 / Open_Auto.ino
Last active April 14, 2018 20:09
latest code for Open Auto particle board
// This #include statement was automatically added by the Particle IDE.
#include <Particle-GPS.h>
#include <ParticleSoftSerial.h>
#include "Particle.h"
//note that the number of live reservations in the system is stored in eeprom location 2046 (i.e. the last slot)
//This is licensed under GPL V3.
//status:
@pingud98
pingud98 / FUNCTIONAL_CAR_DEMO.INO
Created March 10, 2018 16:33
OPEN AUTO FUNCTIONAL TEST
// This #include statement was automatically added by the Particle IDE.
#include <ParticleSoftSerial.h>
/*****************************************************************************
* ParticleSoftSerial library (PSS_SimpleTest.ino)
* Copyright (c) 2016 Free Software Foundation. All right reserved.
* Written by Andreas Rothenw�nder (aka ScruffR)
*
* This sample shows sends data from Serial1 to ParticleSoftSerial(D2/D3)
*
@pingud98
pingud98 / realtimeclock.ino
Created February 7, 2018 07:41
arduino code from SEEED for precision i2c realtime clock with corrected calibration constant.
/****************************************************************************/
// Function: Set time and get the time from RTC chip(PCD85063TP) and display
// it on the serial monitor.
// Hardware: Grove - RTC v2.0
// Arduino IDE: Arduino-1.6.6
// Author: lambor
// Date: June 14,2016
// Version: v1.0
// by www.seeedstudio.com
//
@pingud98
pingud98 / CosmicPiInterruptTest.ino
Last active January 25, 2018 20:04
CosmicPi Interrupt test routine for all three channels, modified from Hendrik's script
/*
Description:
Development firmware for the CosmicPi V1.5.
With this one can set the high voltage and thresholds for the detector on the fly, all while listening to all events.
It indicates detections on all three channels - A for one slab, B for the other slab and C for a coincidence event.
Usage:
Set sensible default values for:
The high voltage: HV_DEFAULT_VAL
Both thresholds: Thresh_default_val
@pingud98
pingud98 / Pushbuttontest.ino
Created January 17, 2018 22:22
Pushbutton test D4
/* ClickButton library demo
OUtput a message on Serial according to different clicks on one button.
Short clicks:
Single click -
Double click -
Triple click -
@pingud98
pingud98 / RelayStatusControl.ino
Created January 17, 2018 21:57
Particle Electron test script for Relay and Status LED functions
// -----------------------------------
// Controlling LEDs over the Internet
// -----------------------------------
// First, let's create our "shorthand" for the pins
// Same as in the Blink an LED example:
// led1 is D0, led2 is D7
int Relay1 = D4;
int Relay2 = D5;
@pingud98
pingud98 / ParticleElectronRFIDReadandPublish.ino
Created January 17, 2018 18:23
Particle Electron reads an RFID Tag, formats it as a string and then publishes it as RFIDident
/*****************************************************************************
* ParticleSoftSerial library (PSS_SimpleTest.ino)
* Copyright (c) 2016 Free Software Foundation. All right reserved.
* Written by Andreas Rothenw�nder (aka ScruffR)
*
* This sample shows sends data from Serial1 to ParticleSoftSerial(D2/D3)
*
* Prerequisites:
* import SparkIntervalTimer library (by Paul Kourany)
* wire Serial1 TX to D2
@pingud98
pingud98 / LHCCreate.pde
Last active November 16, 2017 17:23
Sample code for LHC Create hackathon day. It draws circles in Processing.
//unnamed project
int MaxSegments = 5;
int leftorright = 3; //1 = left, 3 = right
@pingud98
pingud98 / CosmicPiVersion1point5Testing.ino
Last active October 2, 2017 18:05
Test routine for the cosmic pi version 1.5
/*
Features:
Working:
Set HV
Set Threshold
Print out events
ToDo:
Print precise GPS timestamps for events
HV calibration?
@pingud98
pingud98 / I2CTestRoutine
Created September 28, 2017 13:29
Testing I2C device addresses for CosmicPi
#include <Wire.h>
//this code sets values in the MAX5387LAUD+ via I2C.
//it then reads back those values over A1 and A2 inputs
//The ADC is set to 12 bits for the DUE
//Channels are scanned in parallel (0 to 255)
//then alternatively ascending and descending.
//Output is a CSV over serial at 9600bps.
//this test works when testing with board 2