This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin, SPI | |
from os import uname | |
class MFRC522: | |
DEBUG = False | |
OK = 0 | |
NOTAGERR = 1 | |
ERR = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
* | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2023 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 the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tinytuya | |
import time | |
# Connect to Device | |
# set dev_id and local of your devec | |
gosund = tinytuya.OutletDevice( | |
dev_id='eb8bla8a7blad387bla5xc', | |
address='10.11.12.133', # Or set to 'Auto' to auto-discover IP address | |
local_key='#]X[blablablaX~V^$eZ~RI`V', | |
version=3.3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
from threading import Lock | |
import time | |
def synchronized(func): | |
@wraps(func) | |
def wrapper(self, *args, **kwargs): | |
with self._lock: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn = 500; | |
capHeight = 10; | |
capOuterDiameter = 20; | |
capInnerDiameter = 18; | |
screenHole = 1.6; | |
screenThickness = 0.8; | |
screenSlotWidth = 6; | |
screenSlotThickness = 3; | |
screenSlotHeight = 5.25; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pysabertooth import Sabertooth | |
import os, struct | |
import time | |
#classe joystick | |
#classe joystick | |
class MyJoystick: | |
def __init__(self, port): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include "nRF24L01.h" | |
#include "RF24.h" | |
#include "printf.h" | |
#define UNIT 0XF0F0F0F0D2LL | |
#define MASTER 0xF0F0F0F0E1LL |
NewerOlder