You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I'm not sure if anyone has tried it recently, but Espruino has been available for the Pi for years.

    Having discovered wiringPi a few weeks ago, I decided to have another play around. It actually makes Espruino on the Pi really interesting.

    When run with 'sudo' it has...

    • Much faster IO, making software SPI a sensible option
    • All the network and filesystem stuff you'd expect
    • A proper setWatch that uses interrupts
    • Hardware PWM on D1, although it looks like 'softPwm' could work just fine
    • USART support (Serial1.setup(9600,{....path:"/dev/ttyUS­B0"}))

    With the newest Raspbian images, installation is pretty simple too. On a clean install, log in and do:

    git clone git://git.drogon.net/wiringPi
    git clone https://github.com/espruino/Espruino.git­
    cd wiringPi
    ./build
    cd ../Espruino
    make
    

    Anyway, the exciting thing is setWatch really. I just plugged a 433Mhz radio receiver straight into one of the GPIOs and I can actually decode 433Mhz signals with it - using the exact same code that was used on the Espruino board.

    Given the price of Raspberry Pis now this could make a really interesting all-JavaScript base station. The extra oomph of the Raspberry Pi means it should be a lot more reliable when it comes to decoding radio signals.

About

Avatar for Gordon @Gordon started