Skip to content

Instantly share code, notes, and snippets.

View psolyca's full-sized avatar

Damien Gaignon psolyca

View GitHub Profile
@psolyca
psolyca / Audio_bitrates_addresses_table.md
Last active May 4, 2020 15:30
Audio bitrates addresses table for Yi4k #yi4k
Address Value
0xA06D4538 Audio
@psolyca
psolyca / Audio_bitrates_table.md
Last active May 4, 2020 15:30
Audio bitrates table for Yi4k #yi4k

The audio bitrate is stored as a 32 bit integer corresponding to the number of bits per second. ex: 0x1F400 is 128000 bits per second which is 128kb/s.

Bitrates (kb/s) Hex
#8kbs 0x1F40
#16kbs 0x3E80
#32kbs 0x7D00
#64kbs 0xFA00
#96kbs 0x17700
@psolyca
psolyca / video_bitrates_addresses_table.md
Last active May 4, 2020 15:30
Video bitrates addresses table for Yi4k #yi4k

This is for the 4k firmware 1.10.9

Res. num. Address NTSC PAL
@psolyca
psolyca / video_bitrates_table.md
Last active May 4, 2020 15:30
Video bitrates table for Yi4k #yi4k

The values in the video bitrate table are stored as 32 bit floating point values :

Bitrate (Mbps) Hex value
0.05 0x3D4CCCCD
0.1 0x3DCCCCCD
0.15 0x3E19999A
0.2 0x3E4CCCCD
0.25 0x3E800000
0.3 0x3E99999A
@psolyca
psolyca / LightsControl.md
Last active May 4, 2020 15:31
Light control with NodeMCU v3 #nodemcu #esp8266

The goal is to control all my lights with Domoticz and my wall switches.

A NodeMCU v3 will be used as the controller, a PCF8574 board to extand I/O, a 4 relays board to switch lights on/off and a mini AC-DC converter.

ESPeasy is the firmware of the main board and Domoticz the home automation manager.

Home configuration

Lights in the home are simple or 3-way switches. By the way, all cables from live, neutral and between switches and lights are gathered in a connecting box as the following: wiring_present

@psolyca
psolyca / RollerShutter.md
Last active May 4, 2020 15:31
Roller shutter with Electrodragon SPDT and HLW8012 #nodemcu #esp8266

After modding the Electrodragon SPDT, it is time to use it.

The goal is to make a roller shutter switch. A HLW8012 breakout board (energy meter) made also by Electrodragon will be used as a calibration system to handle percentage opening.

ESPeasy is the firmware of the main board and Domoticz the home automation manager.

Hardware

For security reasons and to avoid both UP and DOWN power lines powered in the same time, one relay is the power relay where as the other one is the direction relay.

Following the modding of the SPDT board:

@psolyca
psolyca / SPDT_electrodragon.md
Last active May 4, 2020 15:31
Modding Electrodragon SPDT double relay board #nodemcu #esp8266

Some information about Electrodragon SPDT double relay board that is not on the wiki pages

Flashing the board

To be able to flash the board, the serial bitrate should be 9600, 57600 or 115200 baud. btn2 should be push on reset till beginning of flash (blue LED blink on the other side) after it could be released (keep it pushed till the end of flash if trouble).

Access to GPIOs

GPIO4 and GPIO5

On the main pin header, IO4 and IO5 are inverted thus IO4 is GPIO5 of ESP-12F ans IO5 is GPIO4.