Affichage des articles dont le libellé est Howto. Afficher tous les articles
Affichage des articles dont le libellé est Howto. Afficher tous les articles

mercredi 1 mai 2013

SNES USB Gamepad with Raspberrypi

Last week-end I setup RetroPie with 2 SNES USB gamepad bought on eBay.

I would like to share my gamepad mapping.

HTH



Add these lines at the bottom of the retroarch.cfg
vi /home/pi/RetroPie/configs/all/retroarch.cf

Exit current game and go back to emulator menu with these two lines
input_enable_hotkey_btn = "9"
input_exit_emulator_btn = "8"
Mapping for 2 SNES gamepad

 input_player1_joypad_index = "0"
input_player1_a_btn = "1"
input_player1_b_btn = "2"
input_player1_x_btn = "0"
input_player1_y_btn = "3"
input_player1_l_btn = "4"
input_player1_r_btn = "5"
input_player1_start_btn = "9"
input_player1_select_btn = "8"
input_player1_left_axis = "-0"
input_player1_up_axis = "-1"
input_player1_right_axis = "+0"
input_player1_down_axis = "+1"

input_player2_joypad_index = "1"
input_player2_a_btn = "1"
input_player2_b_btn = "2"
input_player2_x_btn = "0"
input_player2_y_btn = "3"
input_player2_l_btn = "4"
input_player2_r_btn = "5"
input_player2_start_btn = "9"
input_player2_select_btn = "8"
input_player2_left_axis = "-0"
input_player2_up_axis = "-1"
input_player2_right_axis = "+0"
input_player2_down_axis = "+1"




dimanche 3 juin 2012

Setup 20*4 SureElectronics LCDProc


You could setup step by step the 20*4 SureElec. LCD with my memo :o)

Download and extract the archive.
wget http://lcdproc.cvs.sourceforge.net/viewvc/lcdproc/lcdproc/?view=tar
Now we will build the driver.


aptitude install libusb-dev autogen automake
sh ./autogen.sh
./configure –enable-drivers=SureElec
make
make install
nano /usr/local/etc/LCDd.conf

 Then you could copy my LCDd.conf
# LCDd.conf -- configuration file for the LCDproc server daemon LCDd
 ## Server section with all kinds of settings for the LCDd server ##
[server]
Driver=SureElec
# Tells the driver to bind to the given interface
Bind=127.0.0.1
# Listen on this specified port; defaults to 13666.
Port=13666
# Sets the reporting level; defaults to 2 (warnings and errors only).
#ReportLevel=3
# Should we report to syslog instead of stderr ? Default: no
#ReportToSyslog=yes
# Sets the default time in seconds to displays a screen.
WaitTime=5
# User to run as.  LCDd will drop its root priviledges,
# if any, and run as this user instead.
User=root
# If yes, the the serverscreen will be rotated as a usual info screen. If no,
# it will be a background screen, only visible when no other screens are
# active.
#ServerScreen=no
# The server will stay in the foreground if set to true.
#Foreground=no
# Where can we find the driver modules ?
DriverPath=/usr/local/lib/lcdproc/
# GoodBye message: each entry represents a display line; default: builtin
#GoodBye="Thanks for using"
#GoodBye="   LCDproc!"
# The "...Key=" lines define what the server does with keypresses that
# don't go to any client.
# These are the defaults:
ToggleRotateKey=Enter
PrevScreenKey=Left
NextScreenKey=Right
#ScrollUpKey=Up
#ScrollDownKey=Down
# If you have only 4 keys, you can choose to use this:
#ToggleRotateKey=Enter
#PrevScreenKey=Up
#NextScreenKey=Down
# If you have only 3 keys, you can choose to use this:
#ToggleRotateKey=Enter
#PrevScreenKey=Up

## The menu section. The menu is an internal LCDproc client. ##
[menu]
# You can configure what keys the menu should use. Note that the MenuKey
# will be reserved exclusively, the others work in shared mode.
# The following works excellent with 4 keys or more.
MenuKey=Escape
EnterKey=Enter
UpKey=Up
DownKey=Down
# If you have 6 keys you may define these as well
#LeftKey=Left
#RightKey=Right
# If you have only 3 keys, you could use something like this:
#MenuKey=Escape
#EnterKey=Enter
#DownKey=Down

### Driver sections are below this line, in alphabetical order  ###
##Sure
[SureElec]
Device =/dev/ttyUSB0
Edition=2
Contrast=480
Brightness=480

You could start LCDd and you should get a get a Clients: 0 and Screens: 0 on the LCD Screen.
Set parameters in lcdproc.conf file then launch lcdproc.

lundi 5 mars 2012

Proxy Socks over SSH

It is an useful command that let you secure a web connection thanks to an SSH tunnel.

ssh -D 2000 sam@serveur.fr - p 22

-D specify the local port
-p specify the port from your ssh server

Now you just have to setup your Internet browser.