Skip to content

Instantly share code, notes, and snippets.

View danjperron's full-sized avatar

Daniel Perron danjperron

  • Québec, Canada
View GitHub Profile
const int GAUCHE = 11;
const int BARRE = 10;
const int DROITE = 9;
const int button = A0;
const int DEFAULT_DEBOUNCE_MS = 20;
int Val;
int oldVal=HIGH;
int counter = 1;
int delay1 = 1250;
#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <fcntl.h>
#include <malloc.h>
#include <string.h>
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
RF24 radio(8, 10);
const uint64_t pipe[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL};
int DataMsg[1];
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
#define UNIT 0XF0F0F0F0D2LL
#define MASTER 0xF0F0F0F0E1LL
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
/*
* remote control utilisant un nrf24L01
*
* Bouton 1 -> Non momentané N.C. => Stop ALL N.O.=> Tamis ON
* Bouton 2 -> Stop feeder primaire
@danjperron
danjperron / SabertoothTest.py
Last active May 21, 2019 03:34
RaspberryPi_Sabertooth_test
from pysabertooth import Sabertooth
import os, struct
import time
#classe joystick
#classe joystick
class MyJoystick:
def __init__(self, port):
@danjperron
danjperron / raspiInfo.cpp
Last active October 16, 2019 08:04
Raspberry Pi general information
/*
List difference between Raspberry Pi board version
The MIT License (MIT)
Copyright (c) 2015 Daniel Perron
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@danjperron
danjperron / simplePWMSerial
Last active April 7, 2020 20:09
Serial check for arduino pwm
int pwm;
const int controlPin=9;
String inString; // string to hold input
int DisplayInfo=1;
void setup() {
pinMode(controlPin, OUTPUT);
Serial.begin(9600);
pwm = 0;
@danjperron
danjperron / pumpscreen.scad
Created May 24, 2022 01:08
micropump screen
$fn = 500;
capHeight = 10;
capOuterDiameter = 20;
capInnerDiameter = 18;
screenHole = 1.6;
screenThickness = 0.8;
screenSlotWidth = 6;
screenSlotThickness = 3;
screenSlotHeight = 5.25;
#!/usr/bin/python3
import time
# Import the ADS1x15 module.
import Adafruit_ADS1x15