Control Ws2811 leds with an Ipad and HY ministm32v

Posted on
  • Hi i am wondering if there is any way i can control ws2811 leds throught my ipad. I would like to be listening to music at the same time so I dont think the headphone jack would be a good option, any other ideas?

  • Probably the best bet is to attach an ESP8266 WiFi module? The build for the HY board may not support that though :(

    Otherwise you could use a Bluetooth BLE module, but then you'd have to write a custom app for it.

  • Do you have a tutorial to connect them or know of one? The boards are different and it doesnt really tell what pins are where or anything.

  • I'd recommend not using the HY board (save it for something complicated) and getting an ESP8266 (on a NodeMCU for simplicity) for this project. They can run Espruino really well, albeit with not as much free memory as a Pico. I have a few running similar LEDs and they're great.

    The caveat of the ESP8266 is the small amount of memory so you have to be careful programming for them. If you're worried about that then get a Pico, ESP8266 and a shim from Gordon (or get one anyway and support his awesome work).

    Mixing this http://www.espruino.com/WS2811 and this http://www.espruino.com/Interactive+Web+­UI you should be able to do what you want fairly nicely.

  • I think id rather use the board I have so i dont have to buy another one and I also wanted something non wifi based because im using it for lights in a car.

  • I think you probably want to use the HY board because of the LCD and touchscreen as well?

    But if you're using an Apple device and you don't want to use WiFi, your only other option is Bluetooth Low Energy.

    You could get one of these: https://www.adafruit.com/product/2479

    Adafruit has an app with some buttons and a colour picker on it, but if that doesn't do what you want, you'd have to make your own iPad app - which could be a bit painful?

  • That actually looks great! Is there a tutorial to hook it up to my hy board?

  • No, there isn't I'm afraid. You just need to connect power, gnd, and the two Serial (RX and TX) wires though. Then you're just looking for certain sequences of characters that come from it.

    For instance this gives you a good idea (although not for Espruino): https://learn.adafruit.com/bluetooth-neo­pixel-goggles

    The code on that page is in C, but it seems like you're just looking for the characters !C 3 more characters that contain the colour, and one more one which you can safely ignore.

  • So i would hook up the gnd to gnd and Rx on the bluetooth to the usart rx on the hy board? Is there a certain munber one i need to use? and the same with the Tx? and then power it with the 3.3v out from the hy board?

  • You connect GND->GND, RX to TX (and vice versa), and 5V to the bluetooth dongle's VIN (it's designed to run from 5v, not 3.3v).

    I'd use B10 and B11. You need to choose two pins from here that have the same USARTx part, have nearby numbers (5/6, 8/9, etc) and that don't have a pink tag next to them (which would show that they're used for something else).

    Then, if it were B10/11 you'd do:

    Serial3.setup(9600, {tx:B10, rx:B11});
    Serial3.on('data', function(d) {
      print("Got "+JSON.stringify(d));
    });
    

    And you then just need to write some code to interpret the values that you get.

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

Control Ws2811 leds with an Ipad and HY ministm32v

Posted by Avatar for user58623 @user58623

Actions