nodesapiens
v0.0.1
Published
WiringPi based Interface to Robosapiens on Raspberry Pi
Downloads
2
Readme
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:
- turn_right
- right_arm_up
- right_arm_out
- tilt_right
- right_arm_down
- right_arm_in
- walk_forward
- walk_backward
- turn_left
- left_arm_up
- left_arm_out
- tilt_left
- left_arm_down
- left_arm_in
- stop
- turn_right_step
- right_hand_thump
- right_hand_throw
- sleep
- right_hand_pickup
- lean_backward
- step_forward
- step_backward
- turn_left_step
- left_hand_thump
- left_hand_throw
- listen
- left_hand_pickup
- lean_forward
- reset
- right_hand_strike3
- right_hand_sweep
- burp
- right_hand_strike2
- high5
- right_hand_strike1
- bulldozer
- oops
- left_hand_strike3
- left_hand_sweep
- whistle
- left_hand_strike2
- talkback
- left_hand_strike1
- roar
- shuffle
- raise_throw
- karate_chop
- noop
- program_master_command
- program_play
- program_right_sensor
- program_left_sensor
- program_sonic_sensor
- exec_master_command
- wakeup
- exec_right_sensor_program
- exec_left_sensor_program
- exec_sonic_sensor_program
- demo_all
====
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.
====
Enjoy!