Skip to content

Instantly share code, notes, and snippets.

🤖
Beep Boop Beep

Roald Joosen robotjoosen

🤖
Beep Boop Beep
View GitHub Profile
View hotkey_keyboard_ads1115.ino
#include <Wire.h>
#include <Adafruit_ADS1015.h>
#include "DigiKeyboard.h"
Adafruit_ADS1115 ads;
void setup(void)
{
Serial.begin(9600);
ads.begin();
View Clock
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;
View CD4021
//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
View 75HC595_option_2
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 Dec 17, 2015
Different ways of using a 75HC595 on an Arduino.
View 75HC595_option_1
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
Basic code for reading a CD4051 with an Arduino.
View readCD4051
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 Apr 12, 2020
Led toggle by pushbutton - Arduino
View arduino_led_pushbutton.ino
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 Oct 10, 2012
Jerrycan Light Sequencer Old Code
View jerrycan-light-seq.ino
/*
* Author : Roald Joosen
* Project : OFFCENTRE, Jerrycan Lighting
* Date : 10 Sept, 2011
*
*/
int seqSelected;
int timerNext;
int timerSpeed;
@robotjoosen
robotjoosen / veins-74HC595.ino
Created Oct 10, 2012
Veins 74HC595 PWM code
View veins-74HC595.ino
/* ------------------------------------------------------------------------------------------------
* 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
*
* ------------------------------------------------------------------------------------------------ */
@robotjoosen
robotjoosen / simple-robot.ino
Last active Jan 26, 2019
Simple robot code used for the coding of a simple robot part of a workshop.
View simple-robot.ino
//Laad de servo bibliotheek zodat je het zelf niet hoeft te schrijven.
#include <Servo.h>
//IR_SENSOR
static int ir_sensor = 0; //Analoge poort A0
static int ir_threshold = 400; //0-1023 [0 = 0v / 1023 = 5v]
int ir_value;
//SERVO
static int servo_pin_left = 2; //Digital pin 2
You can’t perform that action at this time.