Just to add, there's example code in HopeRF's datasheet: https://www.sparkfun.com/datasheets/Wireless/General/RF12B_code.pdf
You could easily re-write RFXX_WRT_CMD to use SPI and then it's almost a copy-paste job to get it working.
RFXX_WRT_CMD
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just to add, there's example code in HopeRF's datasheet: https://www.sparkfun.com/datasheets/Wireless/General/RF12B_code.pdf
You could easily re-write
RFXX_WRT_CMD
to use SPI and then it's almost a copy-paste job to get it working.