Skip to content

Instantly share code, notes, and snippets.

View robotjoosen's full-sized avatar
🤖
Beep Boop Beep

Roald Joosen robotjoosen

🤖
Beep Boop Beep
View GitHub Profile
@robotjoosen
robotjoosen / quick-start.sh
Last active November 1, 2021 09:58
Quick Start your workspace
.PHONY: install
install:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && \
brew install redis && \
brew install php && \
brew install php@7.2 && \
brew install php@7.4 && \
brew install brew-php-switcher && \
brew install node && \
brew install composer && \
#include <Wire.h>
#include <Adafruit_ADS1015.h>
#include "DigiKeyboard.h"
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
int SER_Pin = 9; //pin 14 on the 75HC595
int RCLK_Pin = 10; //pin 12 on the 75HC595
int SRCLK_Pin = 11; //pin 11 on the 75HC595
#define number_of_74hc595s 1 //How many of the shift registers - change this
#define numOfRegisterPins number_of_74hc595s * 8 //do not touch
boolean registers[numOfRegisterPins];
unsigned long nextStep = 0;
unsigned long timer = 0;
//Declare CD4021 Pins
int __cd4021b_latchPin = 8;
int __cd4021b_dataPin = 9;
int __cd4021b_clockPin = 7;
void setup() {
//Start Serial Communication
Serial.begin(9600);
//Set pinMode of CD4021BCN
int SER_Pin = 9; //pin 14 on the 75HC595
int RCLK_Pin = 10; //pin 12 on the 75HC595
int SRCLK_Pin = 11; //pin 11 on the 75HC595
#define number_of_74hc595s 2 //How many of the shift registers - change this
#define numOfRegisterPins number_of_74hc595s * 8 //do not touch
boolean registers[numOfRegisterPins];
void setup(){
pinMode(SER_Pin, OUTPUT);
@robotjoosen
robotjoosen / 75HC595_option_1
Last active December 17, 2015 05:39
Different ways of using a 75HC595 on an Arduino.
int SER_Pin = 9; //pin 14 on the 75HC595
int RCLK_Pin = 10; //pin 12 on the 75HC595
int SRCLK_Pin = 11; //pin 11 on the 75HC595
//How many of the shift registers - change this
#define number_of_74hc595s 2
//do not touch
#define numOfRegisterPins number_of_74hc595s * 8
@robotjoosen
robotjoosen / readCD4051
Created May 11, 2013 11:50
Basic code for reading a CD4051 with an Arduino.
int ldrArr[2][8];
int port[2];
int portLength = 2;
void setup(){
DDRB = DDRB | B00000111;
Serial.begin(9600);
port[0] = 0;
port[1] = 1;
}
@robotjoosen
robotjoosen / arduino_led_pushbutton.ino
Last active April 12, 2020 12:40
Led toggle by pushbutton - Arduino
int button = 2;
int led0 = 3;
int led1 = 4;
boolean ledToggle = false;
void setup()
{
pinMode(button, INPUT);
pinMode(led0, OUTPUT);
pinMode(led1, OUTPUT);
@robotjoosen
robotjoosen / jerrycan-light-seq.ino
Created October 10, 2012 20:13
Jerrycan Light Sequencer Old Code
/*
* Author : Roald Joosen
* Project : OFFCENTRE, Jerrycan Lighting
* Date : 10 Sept, 2011
*
*/
int seqSelected;
int timerNext;
int timerSpeed;
@robotjoosen
robotjoosen / veins-74HC595.ino
Created October 10, 2012 19:58
Veins 74HC595 PWM code
/* ------------------------------------------------------------------------------------------------
* Cynaptic Collective - Veins Basic v1.0
*
* Project : Veins
* Client : Melkweg Amsterdam / OffCentre 2012 / Deframe Collective
* Author : Roald Joosen
* Start date : 21 aug 2012
* End date : 16 sept 2012
*
* ------------------------------------------------------------------------------------------------ */