MCP23017 and Retropie, some problem appears
-
@stoneset Post a circuit diagram of what you built?
-
Okay !
I have been detect the chip :
pi@raspberrypi ~ $ sudo i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --(Instead the led, i have button)
-
@stoneset said in MCP23017 and Retropie, some problem appears:
(Instead the led, i have button)
Well an LED is an output device! Replacing it with a button if you have built the example on the breadboard you linked could be a bad idea. I know the pins are bi-directional on that device but still, the software should be using I2C - is this something that you know is configured correctly? Have you built retropie from scratch or are you using the official image? I think you might need to enter the Pi configuration settings to enable I2C but this may be a raspi config setting only as opposed to a retropie thing. Also, the breadboard layout could be wrong in the graphic. Normally, you need to bridge the power rails at half way - see the actual photo - did you do this? This is a common mistake.
-
@stoneset Did you replace the 330 resistors with 10k? for your switches? The LEDs are being "driven". If switches are to be placed there as a direct replacement, they will not work. This is because the pins of the chip will be floating when the switch is not pressed. They need holding high.
-
No, i forget to replace the 330 ohm resistor
But, i see the chip when i do "sudo i2cdetect -y 0".
The problem, isn't hardware, but software
They are another library for the mcp23017, and retropie ?
-
@stoneset said in MCP23017 and Retropie, some problem appears:
They are another library for the mcp23017, and retropie ?
RetroPie is not an OS, but just uses Raspbian Lite underneath, so any library geared for Raspbian should work on a RetroPie image.
-
Okay !
But how can I link the gpio controller to retropie ?
With a command ? -
@stoneset You'll need a driver - seems you have picked
mk_arcade_joystick_rpi
- to make your GPIO input appear as a joystick/gamepad, after that you just configure the gamepad in Emulationstation and then use it in your games. -
But I can't install mk_arcade_joystick_rpi
As i say early, i have 404 errors with the script:
wget https://github.com/recalbox/mk_arcade_joystick_rpi/releases/download/v0.1.4/install.sh
-
@stoneset said in MCP23017 and Retropie, some problem appears:
The problem, isn't hardware
It could be. Unless you have a full circuit diagram of your design, it's not going to be possible to check for sure.
-
@stoneset Also is your Reset pin definitely high? Remember "Not RST" means low to reset - active low. Must be held high to run.
-
At this time, i don't have a full circuit diagram
Here is the log when i try to run the script :
https://pastebin.com/zZRM4ZmSAnd the reset pin is connected to 3.3V
-
@stoneset said in MCP23017 and Retropie, some problem appears:
Here is the log when i try to run the script :
Just use the manual installation method from the github project page. The automated script tries to install something that's no longer available to download - there's nothing to fix that.
-
Hi @StoneSet
Contary to @mitu's suggestion, I wouldn't follow the manual install. If you have already followed the manual install, you will probably now have overwritten your gcc with an old version after the first instruction, which may cause problems. You may need to update gcc back to the current build first.
I would suggest installing using the mk_arcade_joystick in the retropie_setup script (this will do all that the install.sh would have done). Then following the instructions on the github page from More Joysticks Case downwards.
Si
-
@simonster is right - the mk_arcade_joystick driver is already included in the RetroPie-Setup script, in the
driver
section. So you just need to install it from setup script and continue on. -
@mitu said in MCP23017 and Retropie, some problem appears:
mk_arcade_joystick
Hi thanks for your reply,
I installed the driver with the script, but when I run :
sudo modprobe mk_arcade_joystick_rpi map=1,0x20
The module was not found....Do you have any suggestion ?
Best regards,
when I run : dpkg-query -l
I get :
ii mk-arcade-joystick-rpi-dkms 0.1.4 all mk_arcade_joystick_rpi driver in DKMS format.I also try : mk-arcade-joystick-rpi-dkms
mkarcadejoystick -
I also get this erros when i try to run :
sudo dpkg -i mk-arcade-joystick-rpi-0.1.4.deb(Reading database ... 89823 files and directories currently installed.)
Preparing to unpack mk-arcade-joystick-rpi-0.1.4.deb ...
Deleting module version: 0.1.4
completely from the DKMS tree.Done.
Unpacking mk-arcade-joystick-rpi-dkms (0.1.4) over (0.1.4) ...
Setting up mk-arcade-joystick-rpi-dkms (0.1.4) ...
Loading new mk_arcade_joystick_rpi-0.1.4 DKMS files...
First Installation: checking all kernels...
dpkg: warning: version '-' has bad syntax: version number does not start with digit
It is likely that 4.9.77+ belongs to a chroot's host
Building for architecture armv6l
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed. -
@stoneset Are you using Berryboot or the RetroPie image ? How was your system installed ?
-
I used the retropie image, i burn the img with etcher
-
@stoneset The error comes from:
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.However, you seem to be using an older version of the RetroPie-Setup script. Update the script and the underlying OS packages, then try again.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.