Beiträge von Mackwhyte

    Hi there, i never had any luck with the sketches without the prefix above 255 leds, Are you sure it's the right prefix you are using? Try
    0x41 0x64 0x61 0x01 0x13 0x47if this isn't what you were using before. Also, when i used a nano it was quite laggy, if you can i'd go for a Mega or an Uno

    I'll have to try these codes when i get my replacement parts, only put the calculator there as i'd had no luck with several different sketches but thanks for the heads up!
    i'll tell you how it goes when i get it set up again

    Well i figured out my issue (well one at least), it appears the USB ports on the Pi have failed, but not in the traditional way! I discovered only 1 of the 4 ports appears to have communication, I had my keyboard/mouse plugged in, the grabber and the arduino and one spare for USB pens/HDD's etc, but when I disconnected everything I noticed one of the plastic tabs that locates the USB had broken. So I ordered some replacement USB Ports and soldered them in this morning. Got the Multimeter and measured each of the test points
    PP1: 5.1V
    PP2: 5.1V
    PP7: 5.1V
    PP8: 3.3V
    PP9: 1.8V
    PP10: 1.8V
    PP27: 5.1V


    PP27 is the USB 5v and all appears to be working, there appears to be a lot of mention of C97 but it appears perfectly fine , i also can't see this being an issue as the ports are all getting power. I confirmed this by plugging in the Arduino, it powers up in all ports but L only blinks in one specific port, I then tried the same with the Keyboard/Mouse and sure enough I get illumination in all ports but only get full functionality in one. Any idea how to proceed? I can only seem to find info that relates to power failure of the ports and not comms issues.


    Oh, the issue with OSMC, my first setup used OSMC pre 2015 and had no issues, I then updated to i think it was August 2017 and also never had issues even though I had read a lot about the incompatibility with Hyperion and OSMC with OS newer than 2015 so it might just be it finally caught up to me, what made it strange was that I had turned off auto update so nothing should have really changed between the two, the SD card checked out fine and I tried another OS with the same issue previous to finding the USB issue so I will have to investigate that if i get the USB working properly again.

    Okay. New update, the ambilight has stopped working entirely! checked the WS2812 Strip and it works fine so the problem is not the LED's. I think OSMC has just stopped working with hyperion. Opened hypercon and in the SSH Traffic window keep getting the following message. "Unit hyperion.service entered failed state." Uninstalled and reinstalled hyperion but no luck. Initially i thought it was the sketch so stupidly i reuploaded it onto the arduino but forgot that my HDD had failed a few months ago, so i''m not 100% sure im using the same sketch I was originally. I made sure that the baud rates were matched at 1,000,000 in both the sketch and config file as i remember that being the last baud rate i tried successfully. However, i can't remember if i had an issue with the prefix, i think i got 0x41, 0x64, 0x61, 0x01, 0x87, 0xd3 for 392 leds but vaguely remember there being an issue involving this. When the arduino is on neither the Rx or Tx light at any time, i remember the Rx light flashing when the ambilight was operational, but i think this may be due to the fact hyperion doesn't seem to be working at all. I also can't currently find my MicroSD card adaptor to try a different Os so im currently stuck, I can't understand how OSMC would suddenly stop working with Hyperion as i have not updated or anything. It just doesn''t even attempt to work. any recommendstions of a working os and arduino sketch combo that works with more than 255 leds?

    OK. one as i said above and started with a fresh install and done some testing, heres what i found;


    OSMC and Arduino sketch using Pin 51 (MOSI) (config file edited to match Baud rates etc.)
    Baud Rate=from 115200 to 460800 tried - Rx Light=ON - Arduino Intro plays=Yes (but only on fresh startup) - Lights respond=No


    OSMC with Arduino Ambilight sketch inc Prefix
    Baud rate-115200 - Rx Light on - Arduino Intro plays=Yes (but only on fresh startup) - Lights Respond No
    Initially tested with PWM pin 6, then 10


    I then tried each PWM pin on the Mega and FINALLY got the lights working on Pin 2.
    If Hyperion is stopped and restarted via SSH the lights will no longer respond until the Pi is rebooted


    After getting the Arduino talking at 115200 I increased the Baud rate to 460800 as the lights were lagging by around a second and a half
    At 460800 the lights were still lagging by just under a second.


    I tried increasing further but looks like hypercon only allows 1000000. This is not bad but there is still a 250-500ms delay.


    So any advice on eliminating the delay? I know the original Pi could handle a speed up to 4000000, although only up til 1500000 stably.
    I also know you can get 2000000 out of a Mega if you edit the UARTnA register
    But would this be the right way to go? Is there another approach I could take to get the lights a bit more synced up?


    Also would you think it would run any better on a different OS? now that I have the Arduino working I couldn't see the OS causing a problem now?

    Just remembered! I read a while ago that Penfold42 made a custom ws2801 to 2812 protocol converter, if he wouldn't mind sharing details i would easily give building one a go if it meant i could get this working. I worked as an Electronics Engineer for 5 years so the assembling part of the circuit wouldn't be an issue, it's usually the software side i'd need help with. I've only just broken into this side and I'm pretty much self taught so I know that I might not have the right info, it would be nice to be kept right.

    Going to try a fresh install of each OS and Hyperion to see if anything changes, is there any way to emulate the bitstream into the Arduino to see if it is the Pi that isn't doing it's job? I've also tried communication through UART but someone might know a better way (I hope). I also have a Teensy 2.0 and 3.1 at my disposal but wasn't sure how to implement them. Looked at getting an Octows2811 and splitting the 392 into 4 strings of 98 but am not 100% sure how to go bout this, the hardware side is fine its the software side that i need to improve upon. I know there is a modified Ambibox capable of running 400 Leds but since seeing it I can no longer find it!

    Tried the new sketch today and still no luck, Runs through the Initial startup then nothing
    Also tried a couple of the prefix sketches i have with the prefix provided by Akriss and no luck either

    Thanks Akriss! At least that confirms I went wrong somewhere with my prefix! i actually had D3 in the script but like i said in post #7 i thought it was totally wrong! If TPModdings script doesn't work i'll have to go back and give that prefix another shot, maybe it didn't like the baudrate or Datapin? I've tried so many combo's now i could have easily missed one!


    Thanks again for that!

    I will do, the setup is at my parents house, i should be there tomorrow so I will keep you posted!


    I did originally have a delay after connect of 20, then i set it higher in the hopes it would help, is there a reason 15 was chosen or is it just a good value?


    Thanks very much for the help!

    Yeah the strand tests are all fine. The ambilight works perfectly through GPIO and a logic converter, its just after the reboot that i get issues hence changing back to Arduino.
    The Arduino plays it's initial opening sequence then no response from there.


    To clarify the strand tests were obviously done with just the arduino, read that back and it sounded wrong haha

    Ok, please tell me the prefix is wrong!


    I tried with the new prefix and still couldn't get it working, tried so many different arduino scripts too, none of them worked. Triple checked Baud rates matched and tried multiple different ones. Tried changing number of LEDS below 256 and got matching prefixes, still won't work. Tried both the Uno and Mega, same thing every time, Rx flashing but no lights.


    Any advice at all? I have now sank 100+ Hours into this, the system doesn't cope through GPIO so I need to something else to do the processing, i was wondering about USBASP but is it limited to 256 Leds?


    Would really appreciate the help, I'm totally out of ideas, don't wan't to buy anything else if i can't even get it working on Uno!

    Hi there, first post and it appears the solution to my problems may be here!


    I have set up an Ambilight system running from RPI3 with Libreelec OS, WS2812B Leds and a UTV007 Grabber/Splitter from Lightberry
    i initially set up the system with an arduino Uno R3 to control the LED's, it would communicate via USB (RX would flash in sequence with info) but no Lights would come on, only boot sequence would repeat whenever i SSH'd hyperion.


    Switched to using the GPIO pins and initially had success running Openelec (latest release) but then out of nowhere the system developed serious lag. it would take 15-20 minutes for the Pi to boot but once it did it would work fine. Tried 2 different SD cards and re-installs, the first reinstall appeared to solve it but upon reboot hyperion wouldn't start. The issue only appeared on first boot though, if i restarted via SSH it would work fine. Same when i tried Libreelec, wouldn't start first time but with none of the "green" issues from the grabber that people seemed to have. Tried OSMC and it wouldn't work at all. Read about the issues with recent versions of OSMC so I got a version from 2015 (30th August) but it wouldn't even boot.


    Reinstalled Libreelec again recently and all seemed well, but then i noticed on the second boot, only 255 of the LEDs lit (out of 392). However, the LED's were still in the right place relative to the screen and effects worked as you'd expect, dissappearing when they would be above LED 255. It appears to be the issue with all my installs that the LED count exceeds 255 so i thought I'd switch back to the Arduino (Although i now have the Mega, incase the Uno is not up to the Job)


    I think my initial failure with Arduino is the same as CrowLight;


    the prefix, mine ending 0X187 0X1D2 (for 392 LEDs)


    Am i right in thinking i need to change this to 3, 2 digit numbers?
    0x01 then ignore the 1 so 0x87 then add 1 to the last value 0xD3?
    or is that totally wrong? (i assume it is!)
    I tried XORing all 3 but there seems to be a lot of debate on which is the correct way to do it.
    I tried 0x01 XOR 0x87 and got 0x89 then XOR'ed again with 0x55 and got 0xDC, that seems more likely!


    So long story short could you confirm how you managed to work out the prefix as i am planning on making another system and will probably again exceed 255 LED's


    Thank you very much for the help and sorry for the Novel, just wanted to make sure al info was there if necessary!