Beiträge von pyr0ball

    I've been struggling for a while to get an Arduino Pro Mini to work with my hyperion install, and thought I'd look for alternative boards, hopefully that could accomodate larger numbers of LED's (I'm setting up a whole room with backlit crown molding. coming in at 508 LED's). These are dirt cheap (bought mine for <$6) and pack 8x the storage and ram as the 328p.


    Wondering how much work might be required to port the adalight sketch over to circuitpython? I've got a little experience with vanilla python 2.7, but the most I've done with the Trinket M0 is flash pre-built binaries.


    If it goes well I may end up integrating one of these chips into the hyperion controller I'm designing to fit into a standard US wall plate complete with touchscreen and all. Based on this project: https://github.com/aderusha/HASwitchPlate


    Thoughts?

    I'm gonna try adding a level shifter, see if that helps.


    edit: No luck. I was able to get feedback from my atmega2560 running at 460800 on it's USB, but not the UART pins.
    I think I've narrowed it down to two possible bottlenecks: UART on the Pi is definitely not liking 460800 baud, and it's possible the Atmega328p can't go above 115200. I'm gonna grab an Atmega32U4 and try with that


    Edit2: Ok finally found something. I'm checking the UART input using an app called minicom. I've got it set to 460800 baud in it's settings, and I tried this with a sketch running at 115200 baud, and it came in correctly, which means the UART port will not go above 115200 even when set to do so.

    Update, got ahold of a sketch with a serial print command on boot, tested at 57600 / 115200 / 460800, fun thing, the two slower baud rates worked, but the 460800 came out garbled, so something is definitely wrong with my pi and it's ability to work at higher baud rates, just need to trace that now.


    I'm gonna try a different RPi image and see if I get different results

    Thanks for the link, unfortunately everything covered in that article I'm past, and it doesn't address increasing baud rates above 115200. A problem I'm running into is I'm not sure how to get serial feedback from the arduino as the adalight sketch doesnt seem to have any serialout for feedback or I could test the connection directly with minicom

    Well that's kinda the point I'm getting at. Hyperion seems to be unable to communicate with either the Pro Mini or the Mega2560 at all at 460800. I'm using exactly the same sketch in each instance, just changing the serial rate in the sketch and in hyperion config. The arduino still shows the boot-up test pattern on the LED's but not hyperion's input.


    Both arduinos work when using 115200, albeit with slow refresh rate when I have them configured for 108 LED's


    To clarify, I'm using the UART pins on the RPi direct to TX0/RX0 on the Mega, and obviously the Pro only has the one serial

    I've been poking around in the threads for a while and solved most of my setup issues doing so. I'm at the point where I'm still just testing Hyperion's direct control over the WS2812 strip before I start diving into the video capture portion of the setup. I'm trying with two different arduinos and getting the same behavior from both, so I can verify the source of the problem. 99% of the testing I'm doing is using direct terminal commands over ssh rather than using the HyperCon software as I tend to lean toward CLI stuff anyway.


    Testing setup:

    • Raspberry Pi 3 running Raspbian Stretch Lite (who needs a GUI on there anyway?)
    • Arduino Pro mini 16mhz 5v // Arduino Mega 2560
    • WS2812b LED strip (currently utilizing only 10 LED's for testing purposes)


    Raspberry pi config.txt parameters set for this project:


    Arduino sketch used:


    hyperion config (devices section only as the rest is currently default generated by HyperCon


    Things that are working:

    • Test light pattern upon arduino boot up (both behave the same)
    • Rainbow swirl upon hyperion service start

      • When arduino is configured for the test number of LED's of 10 AND when running at 115200 baud


    • Serial connection over GPIO UART ttyAMA0 @ 115200 baud
    • Serial connection over ttyUSB0 @ 115200 baud (only tested using ATMega2560)


    What's not working:

    • Serial control at the recommended 460800 baud on any interface
    • Attempted control over direct SPI using a 1k ohm resistor, GPIO18
    • Rainbow Swirl upon hyperion service start

      • When Ardiuno is configured for full strip use (108 LED's) and it's running at 115200 b, the led updates come in around 5-7 "fps"



    So the big problem I'm seeing is that when I set the arduino sketch to use 108 LED's as I expect to need on my TV, the color transitions become very "choppy" regardless if hyperion is configured to use 108 LED's or just the original 10 LED's.


    I'm pretty sure this has to do with the serial communication rate as I'm thus far unable to get my RPi to work over anything higher than 115200 baud. As you can see in the config.txt above I did try to set the serial clock rate higher, but I'm not sure if that's actually working, or how to check the current clock rate.


    Any help would be apprecaited!