jamesbowman / CircuitPython_bteve

MIT License
3 stars 3 forks source link

How to connect RaspberryPi Pico to Gameduino 3 #3

Open ngmacha opened 3 years ago

ngmacha commented 3 years ago

Hi James, maybe I've missed something, but I'm having difficulty to figure out how to connect the Gamduino 3 to Raspberry Pi Pico board. I saw these 3 lines in the gameduino_circuitpython.py file:

    if mach == 'Raspberry Pi Pico with rp2040':
        self.sp = busio.SPI(board.GP2, MOSI=board.GP3, MISO=board.GP4)
        cs = (board.GP5, board.GP6, board.GP7)
       reset(board.GP10)

Following the text at the end of this page https://excamera.com/sphinx/gameduino3/, this is as far as I was able to depict:

Arduino header      Gameduino          RPi Pico
11               SPI MOSI           GPIO3
12               SPI MISO           GPIO4
13               SPI SCK            GPIO2
8               GPU SEL            GPIO5
9               SD SEL             GPIO6
2               INT                ?
?               ?                  GPIO7
?               ?                  GPIO10

I still don't know where to connect the CS GPIO7 and RESET GPIO10 pins on the Pico, and the INT pin on the Gameduino, to. Your clarification is very much appreciated. Thank you - Mac Ha

jamesbowman commented 3 years ago

These two signals (Dazzler CS and Dazzler reset) are only present on the Dazzler. So on the Gameduino 3/3X you can leave them unconnected. (The INT pin is unused by the CircuitPython driver - you can safely ignore it.)

I would expect this to work - I do test against the CircuitPython (Metro) + Gameduino 3X, but have not tried the Pico with Gameduino 3X.

Please let me know if you hit a problem with it and I will try to reproduce here.

ngmacha commented 3 years ago

Thank you very much for a quick reply, James. Unfortunately seems my GD2 and GD3 displays, were laying idle for more then a year now, are both dead :-( Here is what I get typing in the HelloWorld.py example on the REPL of the Pico:

 Adafruit CircuitPython 6.3.0 on 2021-06-01; Raspberry Pi Pico with rp2040
>>> import sys
>>> import bteve as eve
>>> gd = eve.Gameduino()
pgm reset
pgm reset done
cp init complete
>>> gd.init()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bteve/gameduino.py", line 178, in init
AssertionError: No response - is device attached?
>>>

I then tried the Hello World sketch on my Arduino UNO, and the GD2 just light up a clear white screen, while the GD3 went full black... Don't know what happened, the last time, before the COVID, my kids were running Pacman's port on them with the UNOs. This is however out of scope of this issue, I think... Should I close it? Do you have a way to troubleshoot the hardware and revive the displays, if possible?... Kind regards -- Mac Ha