Skip to content

Instantly share code, notes, and snippets.

View projetsdiy's full-sized avatar

Projets DIY projetsdiy

View GitHub Profile
@projetsdiy
projetsdiy / ePaper Raspberry Pi weather dashbord with Jeedom
Last active March 14, 2018 08:06
Create an ePaper Raspberry Pi weather dashbord using Jeedom JSON RPC API
#coding: utf-8
# eInk - ePaper doshboard connected to Jeedom, Open Source Home Automation server
# Waveshare 2,7inch SPI ePaper display
# Full tutorial
# English version https://diyprojects.io/weather-station-epaper-displaydashboard-jeedom-raspberry-pi-via-json-rpc-api/#.WqjWOJPOU_U
# French version https://projetsdiy.fr/station-meteo-affichage-epaper-eink-dashboard-jeedom-raspberrypi-jsonrpc/
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
import requests
@projetsdiy
projetsdiy / rot2u 6dof http client espduino esp8266 evdev gamepad
Created December 21, 2017 21:26
Drive robotic arm with a Gamepad from a Raspberry Pi with HTTP requests and ESP8266
# HTTP Client to drive Arduino Robotic kit (ROT2U 6DOF) with a Gamepad and a Raspberry Pi 3
# Client HTTP permettant de piloter un bras robotique (kit ROT2U 6DOF) avec un Gamepad depuis un Raspberry Pi 3
# https://projetsdiy.fr - https://diyprojects.io - dev. 2017
# Tutoriel complet https://projetsdiy.fr/piloter-bras-robotique-wifi-gamepad-raspberry-pi-python-evdev-requete-http/
import requests, time
from evdev import InputDevice, categorize, ecodes
from threading import Thread
# Adresse IP et point d entree de la requete HTTP sur l'ESP8266 | ESP8266 Http and end point
@projetsdiy
projetsdiy / ROT2U 6DOF HTTP server running on ESPDuino esp8266 gamepad 6 servos PCA9685 shield
Created December 21, 2017 20:52
Drive robotic arm with a Gamepad from a Raspberry Pi with HTTP request and ESP8266 - Arduino Code + Server
/*
* WebSocket server to drive Arduino Robotic kit (ROT2U 6DOF) with a Gamepad and a Raspberry Pi 3
* Serveur webSocket permettant de piloter un bras robotique (kit ROT2U 6DOF) avec un Gamepad depuis un Raspberry Pi 3
* https://projetsdiy.fr - https://diyprojects.io - dev. 2017
* Toutes les étapes https://projetsdiy.fr/piloter-bras-robotique-wifi-gamepad-raspberry-pi-python-evdev-requete-http/
*/
#include <Wire.h>
#include <servo_PCA9685.h>
#include <ESP8266WiFi.h>
@projetsdiy
projetsdiy / ROT2U 6DOF WebSocket server running on ESPDuino or esp8266 gamepad 6 servos PCA9685 shield
Last active December 21, 2017 19:13
Drive robotic arm with a Gamepad from a Raspberry Pi with WebSocket and ESP8266 - Arduino Code + Server
/*
* WebSocket server to drive Arduino Robotic kit (ROT2U 6DOF) with a Gamepad and a Raspberry Pi 3
* Serveur webSocket permettant de piloter un bras robotique (kit ROT2U 6DOF) avec un Gamepad depuis un Raspberry Pi 3
* https://projetsdiy.fr - https://diyprojects.io - dev. 2017
* Toutes les étapes https://projetsdiy.fr/piloter-bras-robotique-wifi-gamepad-raspberry-pi-python-evdev-websocket/
*/
#include <Wire.h>
#include <servo_PCA9685.h>
#include <ESP8266WiFi.h>
#include <WebSocketsServer.h>
@projetsdiy
projetsdiy / rot2u 6dof websocket espduino esp8266 gamepad
Created December 21, 2017 09:45
Drive robotic arm with a Gamepad from a Raspberry Pi with WebSocket and ESP8266
# WebSocket Client to drive Arduino Robotic kit (ROT2U 6DOF) with a Gamepad and a Raspberry Pi 3
# Client webSocket permettant de piloter un bras robotique (kit ROT2U 6DOF) avec un Gamepad depuis un Raspberry Pi 3
# https://projetsdiy.fr - https://diyprojects.io - dev. 2017
#
from ws4py.client.threadedclient import WebSocketClient
import time, requests
from evdev import InputDevice, categorize, ecodes
from threading import Thread
# Adresse du serveur WebSocket sur ESP8266 | WekSocket address on ESP8266
@projetsdiy
projetsdiy / micropython i2c scanner
Last active May 3, 2024 19:45
Micropython i2c scanner
# Scanner i2c en MicroPython | MicroPython i2c scanner
# Renvoi l'adresse en decimal et hexa de chaque device connecte sur le bus i2c
# Return decimal and hexa adress of each i2c device
# https://projetsdiy.fr - https://diyprojects.io (dec. 2017)
import machine
i2c = machine.I2C(scl=machine.Pin(5), sda=machine.Pin(4))
print('Scan i2c bus...')
devices = i2c.scan()
@projetsdiy
projetsdiy / README.md
Last active July 18, 2019 12:00
MySensors v2 Message Decoder

#MySensors v2 Message Decoder Decode every MySensors message according to the serial API specifications.

#Create a JSON object payload This flow create a JSON object as payload with the following key:value data :

nodeId : Node Id
sensorId : child Id
mode : presentation, set, req, internal, stream
type : sub-type depending to the message type