Hey, STM8 fans! I just put up my library code for the TM1637 4-digit LED module on github:
This library gives you easy control of the TM1637 4-digit LED module. These are very cheap on eBay. I just bought five for 81 cents each. Like my other LED libraries, you get the decimal digits, many alphabetic characters, space, hyphen, and underscore.
https://github.com/unfrozen/stm8_libs/wiki/lib_tm1637:-4-digit-LED-controllerUnlike the TM1638 controller used on a lot of 8-digit LED modules, this controller uses a variation of I2C. There is no slave address, so you can't share the bus easily. And where I2C sends the high bits first, this takes low bits first. Start, stop, and ack are compatible with I2C.
Here is my test / example code:
https://github.com/unfrozen/stm8_tests/blob/master/test_tm1637.cSo far, my libraries for cheap I/O include three LED controllers (max7219, tm1637, tm1638), generic LCD (2x16 to 4x20) modules, generic matrix keypads, ultrasonic range finder, and rotary encoder. Does anyone have suggestions for other cheap and useful things to connect?