
GW A
ayaxan7/SolarAlert
SolarAlert is a compact embedded hardware project designed to monitor the health and performance of solar panels.

Python I2C library supporting multiple driver implementations
Eeprom board is an open-source printed circuit board by iynehz, from the iynehz/i2cpy repository on GitHub, published under the MIT licence. It is a 2-layer board of 30.5 × 12.7 mm with 8 parts on 5 nets, routed with 59 tracks and 6 vias.
It is built around the AT24C02C-SSHM-T and AT24C32D-SSHM-T. Its parts include 3 resistors, 2 ICs, 1 capacitor, 1 diode and 1 connector.
I2C is a two-wire protocol for communicating between devices. At the physical level it consists of 2 wires: SCL and SDA, the clock and data lines respectively.
I2C objects are created attached to a specific bus. They can be initialized when created, or initialized later on.
This library is designed to support different I2C driver implementations. At present below drivers are supported:
The interface is similar to that of MicroPython’s machine.I2C
Example usage:
from i2cpy import I2C
i2c = I2C() # create I2C peripheral
i2c.writeto(42, b'123') # write 3 bytes to peripheral with 7-bit address 42
i2c.readfrom(42, 4) # read 4 bytes from peripheral with 7-bit address 42
i2c.readfrom_mem(42, 8, 3) # read 3 bytes from memory of peripheral 42,
# starting at memory address 8 in the peripheral
i2c.writeto_mem(42, 2, b'\x10') # write 1 byte to memory of peripheral 42,
# starting at memory address 2 in the peripheralIf you prefer an “int” interface to the “bytes” interface, you can easily write wrapper functions youself. For example,
# assume you already have a gloal i2c object
def i2c_write(addr: int, memaddr: int, *args):
i2c.writeto_mem(addr, memaddr, bytes(args))
def i2c_read(addr: int, memaddr: int, nbytes: int) -> list[int]:
got = i2c.readfrom_mem(addr, memaddr, nbytes)
return list(got)The i2cpy Python module itself can be simply pip installed,
pip intall i2cpyAnd for the underlying I2C implementations you still need to install their corresponding drivers.
The CH341 series chip (like CH341A) is USB bus converter which converts USB to UART, parallel port, and common synchronous serial communication interfaces (I2C, SPI). The chip is manufactured by the company Qinheng Microelectronics.
The “ch341” driver shipped with this library is a Python interface to CH341’s official DLLs.
You need the driver DLL files, which are downloadable from Qinheng’s website.
Windows: https://www.wch-ic.com/downloads/CH341PAR_EXE.html
They also have a zipball https://www.wch-ic.com/downloads/CH341PAR_ZIP.html . If you use the zipball on Windows it’s recommended to place the DLL files, CH341DLLA64.DLL and/or CH341DLL.DLL depending on the bitness, under Windows System32/SysWOW64 folder. Or if you place them under a different directory, you can add that directory to PATH environment variable.
Linux: https://www.wch-ic.com/downloads/CH341PAR_LINUX_ZIP.html
On Linux you need to build the kernel module from source under the downloaded zipball’s driver sub-directory like below.
$ cd driver
$ sudo rmmod ch34x_pis
$ make && sudo make installAlso you need to either place the libch347.so file for your platform to system supported path like /usr/local/lib, or you make the so file loadable by adding its directory to LD_LIBRARY_PATH environment variable.
And because Qinheng sometimes updates their Linux driver and breaks backward compatibility, be careful when you upgrade their Linux CH341PAR driver version, and make sure your effective libch347.so file and your compiled kernel module come from the same driver version.
Still on Linux there could be more details like, system package linux-headers-$(uname -r) being a prerequisite of making the kernel module, and permissioning of /dev/ch34x_pis*, etc.. Those are beyond scope of this doc though.
macOS is not supported. See also this ticket.
Example usage:
from i2cpy import I2C
i2c = I2C() # ch341 is the default driver
i2c = I2C(driver="ch341") # explicitly specify driver
i2c = I2C(0) # override usb id
i2c = I2C("/dev/ch34x_pis0") # override device path on LinuxThe CH347 series chip (like CH347T) is USB bus converter manufactured also by Qinheng Microelectronics.
The “ch347” driver shipped with this library is a Python interface to CH347’s official DLLs.
You need the driver DLL files, which are downloadable from Qinheng’s website. As they are actually the same downloadable files as that of CH341, see ch341 section above for how to install.
Example usage:
from i2cpy import I2C
i2c = I2C(driver="ch347") # specify ch347 driver
i2c = I2C(0, driver="ch347") # override usb id
i2c = I2C("/dev/ch34x_pis0", driver="ch347") # override device path on LinuxConstructor.
Union[str, int, None]) – Identifies a particular I2C peripheral. Allowed values depend
on the particular driver implementation.int) – I2C bus baudrate, defaults to 400000Optional[str]) – I2C driver name. It corresponds to the I2C driver sub
module name shipped with this library. For example “foo” means module
“i2cpy.driver.foo”.
If not specified, it looks at environment variable “I2CPY_DRIVER”.
And if that’s not defined or is empty, it finally falls back to “ch341”.bool) – Call init() on object initialization, defaults to TrueInitialize the I2C bus.
Close the I2C bus.
Scan all I2C addresses between start and stop inclusive and return a list of those that respond. A device responds if it pulls the SDA line low after its address (including a write bit) is sent on the bus.
Depending on the specific driver and OS platform, scan() may or may not work.
int) – start address, defaults to 0x08int) – stop address, defaults to 0x77List[int]Write the bytes from buf to the peripheral specified by addr.
int) – I2C peripheral deivce addressBuffer) – bytes to writeRead nbytes from the peripheral specified by addr.
int) – I2C peripheral device addressint) – number of bytes to readbytesWrite buf to the peripheral specified by addr starting from the memory address specified by memaddr.
int) – I2C peripheral device addressint) – memory addressBuffer) – bytes to writeint) – address size in bits, defaults to 8Read nbytes from the peripheral specified by addr starting from the memory address specified by memaddr.
int) – I2C peripheral device addressint) – memory addressint) – number of bytes to readint) – address size in bits, defaults to 8bytesRead into buf from the peripheral specified by addr starting from the memory address specified by memaddr. The number of bytes read is the length of buf.
int) – I2C peripheral device addressint) – memory addressbytearray) – buffer to store the bytes readint) – address size in bits, defaults to 8If you use Nuitka to package your Python code that uses i2cpy, you need to specify the implicit-imported module, as otherwise Nuitka won’t be able to find by itself. For example you can use a nuitka-package.config.yml file with below content.
- module-name: 'i2cpy'
implicit-imports:
- depends:
- 'i2cpy.driver.ch341'And run the nuitka command like,
nuitka --standalone --onefile --user-package-configuration-file=nuitka-package.config.yml your_script.pyFor other packaging tools like Pyinstaller, etc., the idea is similar.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 4.7K | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R1, R2 |
| 1 | 100nF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C1 |
| 1 | 1K | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R3 |
| 1 | AT24C02C-SSHM-T | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U1 |
| 1 | AT24C32D-SSHM-T | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U2 |
| 1 | Conn_01x04_Pin | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J1 |
| 1 | LED | LED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder | D1 |

ayaxan7/SolarAlert
SolarAlert is a compact embedded hardware project designed to monitor the health and performance of solar panels.

Scottapotamas/spe-marine-node
Prototype project to build an underwater sensor node, powered by and communicating with the surface via Single Pair Ethernet (10BASE-T1L + 802.3cg)

vkar9898/Cluster2HDMI
A project dedicated to utilising a 7 inch LCD panel as a standalone monitor via a HDMI-parallel RGB converter and a Pico 2 fitted on a custom PCB

Maillouski/Model-2-IO-Board-for-m2m3
Drop-in replacement for the Sega 837-10539 I/O board (Daytona USA twin, Model 2), built around an Arduino Mega 2560. KiCad 10, CC BY-NC-SA 4.0.


joeycastillo/Sensor-Watch
A board replacement for the classic Casio F-91W wristwatch

rusefi/rusefi
rusefi - GPL internal combustion engine control unit

hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI
It measures 30.5 × 12.7 mm and has 2 copper layers, 1.6 mm thick.
8 parts, built around the AT24C02C-SSHM-T and AT24C32D-SSHM-T. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the iynehz/i2cpy repository on GitHub, at the commit this page was made from: the board is board/eeprom_board/eeprom_board.kicad_pcb and its schematic board/eeprom_board/eeprom_board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).