What I understand is SPI is usually the best option if speed is concerned
No, the Uno uses those two pins for USB serial. It would be possible on a Leonardo for example though, because it uses a separate serial interface for USB, and the TX(1) amd RX(0) pins are referenced as Serial1 instead.
You could always use a āSoftwareSerialā library though, and choose any two pins you like.
As @MLXXXp mentioned, if you go with I2C, connect the grounds of the Uno & Pokitto as well.
Iāve decided to attempt I2C next because that diagram looks easiest if it doesnāt have any 3.3V/5V issues.
Iāve just read into Ohms law, so I understand the equation, but I donāt know how to derive the values.
Iāve decided to dig around for some guides and diagrams and Iāve found an arduino one that looks quite promising.
Interestingly it notes:
There has been some confusion about the minimum voltage for a āhighā level. For the normal digital input pins of the ATmega328p this is 0.6 * Vcc. However, for the I2C pins it is 0.7 * Vcc
So actually thatās 3.5V, not 3V which possibly complicates matters.
Iāve seen the āPhilips Applications Note AN97055ā thrown around a lot.
If a BC547 is a sufficient replacement for the mosfets in the diagram then I could certainly attempt that set-up.
I may opt for that if I struggle with I2C.
I only have a vague idea of what Iām doing, like a BASIC programmer trying to write C code.
Iām not even sure where the crystal is located, but since Iād need the USB serial, thatās probably not the best option.
At the moment speed isnāt the issue, I just want a way to be able to transmit data of a reasonable size (e.g. 8 bits in one function call).
I can always move up to SPI later.
i think arduino wire is exactly 8 bits via spi, wire is also for i2c
i2c is probebly the easiest one to work with and also easyer to chain with mutliple devices if need be (arduino and esp32 and whatever else you want :P)
ā¦could try anyway and see how reliable or not it is?
Yes, they use that method on the Video Game Shield to safely talk to 3.3V Wii Nunchuks, good explanation at the bottom of this page:
https://www.wayneandlayne.com/projects/video-game-shield/design/
NPN Transistor in place of the MOSFETs might not work - someone had an idea here using NPNs though:
http://forum.arduino.cc/index.php?topic=4215.0
ā¦once it starts getting this complicated, the most sane solution might just be a good olā level-shifter:
ā¦or just pull-up to 5V instead if it has been established that the Pokittoās I2C pins are fine with that? Could use one of your diodes for a small voltage drop, to have something-slightly-less-than-5V to pull-up to?
I only have two kinds of transistors and Iāve only got one of the other kind,
so at this rate, yeah, itās looking like I probably am just best off ordering some new parts.
One idea I did have was to somehow abuse an optocoupler to isolate the two halves of the circuit, but I think Iād need more than one and frankly I donāt know if itās a good idea or not anyway.
Hrm, Iāll mull it over a bit.
(Electronics is hard, I think I prefer template metaprogramming :P
)
i was wondering, why the uno and not something else Arduino based at 3.3v? ZERO, DUE, Teensy, ESP8266
Because I already own an Uno and didnāt want to buy any new parts if I could get away with what Iāve already got.
I was hoping it would be a simple matter of a couple of diodes and resistors.