Skip to content

Instantly share code, notes, and snippets.

View hhayley's full-sized avatar

Hayley Hwang hhayley

View GitHub Profile
/*
Edited 'sACN intro.ino' for using a push button
It requires 'arduino_secrets.h'file with SSID and password info.
This sketch creates a sACN packet, then uses it to send
fade information to an sACN receiver.
This was originally tested with a DMXKing eDMX1 Pro
and a Coemar LEDko Revlection series spot.
https://dmxking.com/artnetsacn/edmx1-pro
http://www.coemar.com/bin/index.php?id=22&serie=2&lng=en&tipologia=1
/*
Actuonix PQ12 Micro Linear actuator with Arduino
https://www.robotshop.com/en/firgelli-technologies-pq12-actuator-12v-pot.html
H-Bridge(L293NE) / 12v power supply
potentiometer (P+->5V / P->A0 / P-->GND)
M+, M- -> motor pins
~D9 : Enable pin (control speed)
D10,11 : motor control pins
by Hayeon Hwang (03/04/2018)
@hhayley
hhayley / ArduinoSerial.cs
Last active June 13, 2019 07:30
ITP CAMP 2019 - Unity C# scripts for Serial Communication from Arduino
using UnityEngine;
/*
* To use 'System.IO.Ports;', you should change in Player settings
* Build Settings - Player Settings - 'Player' tab
* Configuration - Api Compatibility Level* ---> change to ‘NET 4.x’
*/
using System.IO.Ports;
public class ArduinoSerial : MonoBehaviour
{
@hhayley
hhayley / MYOC_ArduinoUnity_Multi.ino
Last active June 19, 2019 07:58
ITP CAMP 2019 - Arduino Code
/*
Unity <---> Arduino (Serial Communication)
- Send Multiple sensor values to Unity
Tested Unity version 2019.1.6f
For 2019 ITP CAMP Workshop "Make your own controller in Unity"
By Hayeon Hwang. 2019.06.13
*/
const int ledPin = LED_BUILTIN;
const int potPin = A0; // Analog input pin that the potentiometer is attached to