Skip to content

Instantly share code, notes, and snippets.

/**************************************************************************************************
Holgrim temp and lights arduino
Written by: Luke A Bain
Scope: Control of temp and light strips
Version: sudo code
Requirements: arduino Micro or Leonardo
**************************************************************************************************/
//#include <Keyboard.h> //leaving this here for things
#include <math.h>
#define SERIESRESISTOR 10000
/**************************************************************************************************
Holgrim temp and lights arduino
Written by: Luke A Bain
Scope: Control of temp and light strips
Version: sudo code
Requirements: arduino Micro or Leonardo
**************************************************************************************************/
//#include <Keyboard.h> //leaving this here for things
#include <math.h>
#define SERIESRESISTOR 10000
/**************************************************************************************************
Holgrim temp and lights arduino
Written by: Luke A Bain
Scope: Control of temp and light strips
Version: sudo code
Requirements: arduino Micro or Leonardo
**************************************************************************************************/
//#include <Keyboard.h> //leaving this here for things
#include <math.h>
#include <FastLED.h>
/**************************************************************************************************
Holgrim temp and lights arduino
Written by: Luke A Bain
Scope: Control of temp and light strips
Version: sudo code
Requirements: arduino Micro or Leonardo
**************************************************************************************************/
//#include <Keyboard.h> //leaving this here for things
#include <math.h>
#include <FastLED.h>
/*******************************************************************************************************************************************
Joystick to keyboard for MAME arcade
Written for Geeks Mania
4-20-2018
By: Luke A. Bain
*******************************************************************************************************************************************/
/*******************************************************************************************************************************************
Requirements and notices:
For each set of controls one arduino programmed with this code will be needed. This code is to be used with an arduino Micro or Leonardo.
The code can support one 4 way joystick and 9 buttons with optional coin slot. This is coded for player 1 ONLY!
/**************************************************************************************************
Holgrim control arduino
Written by: Luke A Bain
Scope: Keyboard emulation,button lights and actuation of fan and rumble feature
Version: sudo code
Requirements: arduino Micro or Leonardo
**************************************************************************************************/
#include <Keyboard.h> //for keyboard command to PC
#include <Servo.h> //for servo (fan) and rumble motor
void setup(){
/**************************************************************************************************
Holgrim control arduino
Written by: Luke A Bain
Scope: Keyboard emulation,button lights and actuation of fan and rumble feature
Version: sudo code
Requirements: arduino Micro or Leonardo
**************************************************************************************************/
#include <Keyboard.h> //for keyboard command to PC
#include <motor.h> //for servo (fan) and rumble motor
void setup(){
/******************************************************************
Author: Luke A. Bain
Date: 10-3-15
Description: restarting PC application for Arduino
******************************************************************/
int X = 1;
int switchpin =7;
int relaypin = 12;
@Bainerd
Bainerd / gist:8039159
Created December 19, 2013 13:35
array2_1
#define trigPinFL 8 // Front left sensor send on pin 8
#define echoPinFL 7 // Front left sensor receive on pin 7
#define trigPinFR 3 // Front right sensor send on pin 3
#define echoPinFR 4 // Front right sensor receive on pin 4
void setup(){
Serial.begin(9600); // baud rate for serial monitor interface
pinMode (trigPinFL, OUTPUT); // Sets pin 8 as output for FL sensor
pinMode (echoPinFL, INPUT); // sets pin 7 as input for FL sensor
pinMode (trigPinFR, OUTPUT); // sets pin 3 as output for FR sensor
@Bainerd
Bainerd / gist:8039150
Created December 19, 2013 13:34
redux1_1
/******************************************************************
Author: Luke A. Bain
Date: 12-1-13
Description: obstacle avoidance two sensors and motors
******************************************************************/
#include <SPI.h> // include spi for raspberry pi communication
#include <Servo.h> // include servo to control both steering servo and brushless motors/ESC
#include <NewPing.h> // include for ultrasonic sensor and distance measurement
#include <SoftwareSerial.h> // include for motor controller communication
#define rxPin 5 // not used receive from motor controller