WiringPi based Interface to Robosapiens on Raspberry Pi
npm install nodesapiens
|2||downloads in the last month|
|Version||0.0.1 last updated 8 months ago|
|Keywords||wiringPi, gpio, raspberry, pi, robotics, robosapiens|
sapiens-js-- Nodesapiens. Node.js Robosapiens Interface on Raspberry Pi
Sapiens.js is a straightforward high level abstraction of the Robosapiens family of robotic toys leveraging wiringPi and the well known IR PCB hack to send faked IR commands to the toy.
Currently only the Robosapiens V1 IR command codes are supported. The robosapiens.tell native function requires the IR-OUT line on the head controller to be cut with the head end wired to GPIO 0 (PIn #17) and printed circuit board end to GPIO 1 (Pin #18). A ground connection will also need to be provided. The function essentially modules an 8 bit signal directly into the Robosapiens circuitry mimicking a button push on the Remote Control unit.
As the signal is normally high the signal is set high during initialization of the native Node.js module. When a command is issued through calling one of the built in sapiens module functions the robot peforms that action.
For example, calling nodesapiens.karate_chop() will result in a signal preamble and 8 data bits to be sent to the robosapiens. The preamble is an 8 period delay. The data bits are 4 or 1 periods in length depending on whether a 1 bit or 0 bit is being encoded followed by a low signal for another period. When signalling is complete the signal line is returned to normally high operation. The clock rate requires a 1/1200 clock or 833 microsecond periods.
There are 60 commands available via the sapiens module:
NOTE: This will work with node v0.10.3 stable. Due to upgardes of the v8 engine in v0.11.4 it will compile but the native modules will exhibit runtime errors.