#joystick #input #async #ui

sn30pro

A small library for interfacing with the SN30Pro controller

2 unstable releases

0.2.0 Feb 7, 2022
0.1.0 Feb 7, 2022

#1290 in Hardware support

29 downloads per month

MIT/Apache

16KB
396 lines

sn30pro

Small rust library for the sn30pro controller


lib.rs:

SN30pro

A simple library for interfacing with the 8BitDo SN30pro controller on linux (and linux only)

this should also work with a xbox360 controller with some modifications (L2 and R2 are not buttons with the xbox 360), as the SN30 identifies itself as one to the computer, and probably uses the same api

Platform support

linux only, and there are no plans to expand this, as this is mostly a learning project for me

Getting Started

the base of the library is the Controller, which is initialized with the id of the controller you want to connect to (corisponds to /dev/input/js{})

this library uses async io, so you need a async executor to use it

use sn30pro::Controller;

let mut sn30: Controller = Controller::new(0).await?;// for the controller at /dev/input/js0

Dependencies

~2.1–3MB
~49K SLoC