
When I was looking at a few I2C libraries someone wrote, I found zero documentation or barely any comments although the libraries seem very well written. I have learned a lot of linux stuff from ground up but it's worth to look. If you have not checked out the pi, I strongly recommend it. Arduino is only good for doing more basic stuff, not for internet. This pushed me eventually towards raspberry pi, after what I found out about the wifi shield (and dealing with it). When people rely on the stuff to do serious work and reset things without resetting Arduino, the satisfaction is not there.

It's their ideology that if it works one time, it's good enough for open source. They finally added a few end to some begin but that's not enough. To them, it's not that hard to end things that they know how to begin. Seems to me there should be a Wire.end, Serial.end and SPI.end.Īnything that has. Like the DUE audio stuff, you can play one sample and no way to reset to do it again (as of a few months ago). It's a very amateurish approach, do one thing once and be happy, don't expand into doing several things one at a time repeatedly for weeks without resetting. So according to the last line, init seems to do some TWEN, TWIE and TWEA bits but what is _BV? Bit value (macro)? Should I just do TWCR=0 to clear everything for the end()? Can someone confirm? Right now I am just forcing pinMode to the A4 and A5 and it works fine but I feel like I am doing the wrong thing. TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) enable twi module, acks, and twi interrupt It is 72 for a 16mhz Wiring board with 100kHz TWI */ Note: TWBR should be 10 or higher for master mode SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR))


* twi bit rate formula from atmega128 manual pg 204
