BV4218 Complete library

Building on the work of John Crouchely I'm adding in keypad support for the BV4218. This thread will be a central location so we don't keep hijacking other threads.

Ok, just finished emailing Jim and he said there could be a couple problems. Most notably is that keys that don't return values may point to an incorrectly wired keypad.

Since we can program the 4218 I'll be adding in a programming function for the keypad. You press key 1 and we program the eeprom so it works correctly.

The library should be finished by nov. 20 barring any postal delays.

I'll have a video showing how to wire everything up as well as code examples when it's released. Until then, just sit tight :)

Alright, I've got an early Christmas present for everyone!

The i2c module came in today and after many hours I finally got it working.

The problem is that I really don't think his wiring diagram is right. I tried wiring every which way and it never works as it should.

Anyways, what we do is re-program the eeprom for the correct values. The full scoop is here:

You'll need to copy the code there and upload it to your arduino. Right afterwards go to the serial monitor. It will say starting up... for a bit and than tell you to press a key (only press them once). After that's done just upload the code to verify it's right and your off. If it's not right try a hardware reset.

I hope everybody enjoys it. I think my gf is a little mad because of all the time I spent on it lol.

Anyways, enjoy.

Hi andrew, You are my king ! It works fine after Hard reset?Thank you again for your time. ++

I'm glad it worked. I only tested it a couple times, but it seems if you run that code once and it doesn't work a hard reset does the trick.

Thanks a lot!! I have made a big step but not all the keys seems to work well. Can you explain to me the hard reset that I have not understand? Davide

Yeah, if you run the code once and it doesn't work you'll need to do a hard reset.

To do that power down everything. Connect the INT pin to ground and power it back up again. That will reset the eeprom on the device. Run the code again and it should work for you.

Thanks Andrew,
now I have understand and I have fixed a lot of keys…not every but I think that is my fault…my solder skill is very low.
I’m follow your aquarium project and it’s great!!!
If you work also to an EC sensor I will be happy!!
Thanks again,

Ec meter will come soon. I need to get the code done for what we have now though. Over 1000 lines so far and its looking pretty good.

What Temp sensor did you use? I can't find it in all the text.

The temp sensor used is a DS1B820