- C++ 100%
| .vscode | ||
| include | ||
| lib | ||
| schematics | ||
| src | ||
| test | ||
| .drone.yml | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| platformio.ini | ||
| Readme.md | ||
WebResetter Client
This repository is part of my WebResetter project. It contains the code and the schematics for the Client which gets connected to the Computer. It communicates via I2C to the WebResetter Server. The Server provides a HTTP API to control the Client. As the client dosn't need very much resources a attiny25 is enough. You can also use a attin45 or attiny85, but the additional space is not needed.
I2C Communication
The I2C Messages are always 2 Bytes long. The fist contains the command and the second the value. All clients have as default I2C address 0x02. You can change the address by a command.
Commands
| Command | Value | Description |
|---|---|---|
| 0x01 | 0x01 | Press the power button short |
| 0x01 | 0x02 | Press the reset button short |
| 0x02 | 0x01 | Press the power button long |
| 0x02 | 0x02 | Press the reset button long |
| 0x03 | 0x00 | Set the I2C Address ( The value is the address ) |
| 0x04 | 0x00 | Set the short delay in seconds ( The value is the delay ) |
| 0x05 | 0x00 | Set the long delay in seconds ( The value is the delay ) |
MCU Install
To programm the MCU you need a ISP Programmer like the USBasp. You can either use PlatformIO to compile the firmware yourself or use avrdude ( or avrdudess for a GUI version ) to upload the precompile firmware from the CI assets. The precompiled firmware is always for attiny25, but you can use it for attiny45 and attiny85 too.
For flashing with the USBasp it is required to short the J3 Header on the USBasp.
Connections
The PCB contains two RJ11 sockets. One is the input and the other one the output. It doesn't matter which one is which. Via the RJ11 power and I2C is transported. The connector CN1 is for SPI flashing the MCU. On the right you have the pins for connecting the reset and the power button of the computer.