dekuNukem / bob_cassette_rewinder

Renew and Refill Bob Cassettes for 98% Cost Saving!
MIT License
1.44k stars 44 forks source link

Using an Arduino to reset the counter? #10

Open DDanielH opened 3 years ago

DDanielH commented 3 years ago

Hi, is it possible to use an Arduino to write the counter on a cassette and if yes are you planning on writing some kind of tutorial?

rubyFeedback commented 3 years ago

Would be useful to know; I guess the corporations will try to desperately counter the civil rights-to-repair movement, so information in this regard is super-helpful in the long run. And Arduino's are quite accessible even for semi "Average Joe's" (give or take).

dekuNukem commented 3 years ago

Of course! It's just a bog standard EEPROM inside, and you can use any arduino to read and write it.

Here's a tutorial on sparkfun: https://learn.sparkfun.com/tutorials/reading-and-writing-serial-eeproms/all

dekuNukem commented 3 years ago

The PCB plugs into a USB-A female socket just fine:

https://raw.githubusercontent.com/dekuNukem/bob_cassette_rewinder/master/resources/pics/pmm.jpeg

the pinouts are, from left to right in that photo on the USB socket, VCC, SDA, SCL, GND

DDanielH commented 3 years ago

I hope this is not to mutch to ask, but do you have some example code on how to write the byte at address 0xa1? If i get this right: theoretically I just need to access the EEPROM via i2c and write 0x4e at address 0xa ?

Edit: I am struggling a bit with the EEPROM I2C address... are all 3 pins grounded for address 0x50?

dekuNukem commented 3 years ago

this should be a decent tutorial: https://microcontrollerslab.com/24c04-two-wire-serial-eeprom-interrfacing-arduino/

A0, A1, A2 are all grounded on bob cassette's EEPROM, so the address should be 0x50.

Someone in the discord chat got it working with an Arduino, so maybe you can try asking there as well.