|
Post by chrischris on Apr 13, 2016 11:36:15 GMT -8
Arduino Zero comfirmed working with the Gameduino2. Thanks to the changes made by James Bowman for the due, it was actually quite easy to get up and running using jumper wires and the standard spi header. Next, the arduino zere has whats called sercoms, a Multiplexing system to allow additional com's such as uarts/spi/and i2c to almost any I/O on board, with an explanation on configuring these sercoms found on Adafruit.com we may have the zero plug and play compatible with the gameduino2 real soon here. I have also put together a function based off of other functions i've found in various sites to create a faster digitalWrite for the arduino zero. Enjoy.
#ifdef _VARIANT_ARDUINO_ZERO_
inline void digitalWriteDirect(int PIN, boolean val){
if(val) PORT->Group[g_APinDescription[PIN].ulPort].OUTSET.reg = (1ul << g_APinDescription[PIN].ulPin);
else PORT->Group[g_APinDescription[PIN].ulPort].OUTCLR.reg = (1ul << g_APinDescription[PIN].ulPin);
}
//inline int digitalReadDirect(int PIN){
// return !!(g_APinDescription[PIN].ulPort=PIO_PDSR &g_APinDescription[PIN].ulPin);
//}
#endif
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWriteDirect(13, HIGH );
delay(1000);
digitalWriteDirect(13, LOW );
delay(1000);
}
|
|
|
Post by chrischris on Apr 13, 2016 11:37:54 GMT -8
also, my GD2.h and GD2.cpp with changes made to make it work thus far. GD2.cpp (24.88 KB) GD2.h (30.29 KB)
|
|
|
Post by iinfinityy on Sept 12, 2022 5:06:13 GMT -8
hello, nice work but have you a newer version for the latest gemeduino2 lib?
|
|