Pixl.js + Arduino shields

Posted on
  • Hi! I'm adding some documentation and examples for adding Arduino shields to Pixl.js: http://www.espruino.com/Pixl.js#arduino

    So far we have:

    • motor driver
    • Ethernet + SD card
    • WiFi
    • GSM
    • Seeed Grove

    Is there anything specific that you'd like adding? I'm thinking mainly cheap, common shields that might work well on a Puck.js.

  • The Mikroe ecosystem is evolving fast, with huge amount of plug-in boards (named Click. Currently, more than 450 Click boards so far).
    https://www.mikroe.com/click

    It would be very nice to get support of this Click-to-Arduino shield :-)
    https://www.mikroe.com/arduino-uno-click­-shield

  • Any ideas what the library would actually do? Realistically I'm not going to be able to add drivers for 450 different boards :)

  • this data logging shield would be very convenient: https://www.adafruit.com/product/1141

  • the two other categories i'd put high on my projects are shields for relays (to control high voltage) and audio/dac to add music to my projects.

  • Any ideas what the library would actually do? Realistically I'm not going to be able to add drivers for 450 different boards :)

    Why not? ;-)

    I was only thinking about really small code examples for setting up the communication interfaces (UART, SPI or I2C) on the correct pins. Or even better, a kind of abstraction layer for modules compatible with the "mikroBUS" (spec here: https://download.mikroe.com/documents/st­andards/mikrobus/mikrobus-standard-speci­fication-v200.pdf)
    In page 6 is showed the pinout of the mikroBUS.
    I could be very cool to be able to get access to this by calling some thing like

    var mikroBUS= new mikroBUS();
    
    digitalPulse(mikroBUS.RST, 1, 5);
    mikroBUS.SPI.send("some data");
    analogRead(mikroBUS.AN);
    //and so on...
    
    
  • Hi,
    Could you consider adding Lora and Sigfox shields?
    Albeit long range they are rather energy savvy.

  • I would love to have a USB host shield supported. The official Arduino USB host shield uses the ICSP header, so that won't work, but the Sparkfun one looks like it might work?

    I noticed there was an earlier attempt at making a shim for the Pico, but it hasn't seen any activity in over 2 years. Now that the Pixl.js supports Arduino shields (and there's a shield adapter shim for the Pico), the main work is in porting all the libraries over, right?

  • Yes, it sounds like the SparkFun one would work fine - as you say, it's just just software support!

    I imagine it wouldn't be super painful to get something simple like a USB keyboard working though. What peripherals did you have in mind that you wanted to connect?

  • I have a bunch of different diabetes devices, from blood glucose meters to insulin pumps, that I want to connect so I can display the data on the Pixl.js screen. I see there are libraries for the various USB chips in these devices (e.g. Prolific, FTDI etc.) that were written for that shield, so I'm looking at porting those drivers. I already have JS code to read and parse data from the devices, but not from raw USB.

    Maybe the HID USB driver would be a good start, as some meters use that to send data, and it can be used for keyboards too ;)

  • Ahh - interesting. I guess HID and virtual COM port (Prolific, FTDI) wouldn't be too difficult once USB was working.

    It's just all the initialisation code that's required - I wonder if there's a super simple bit of example code out there for using the MAX3421E that would be a bit easier to use as a base than that library?

  • I managed to get the USB host shield working in July 2018 and then completely forgot about it for a year. Oops! I just did a write-up (with source code) on Hackster.io: https://www.hackster.io/gerrit-niezen/ad­ding-usb-host-support-to-espruino-2c494d­

  • This is great! Thanks! Would you be ok with me turning this into a module?

  • That would be great, I published it under the MIT license for this purpose! Let me know if there's anything I can help with.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Pixl.js + Arduino shields

Posted by Avatar for Gordon @Gordon

Actions