Code Monkey home page Code Monkey logo

Comments (3)

lukefanning avatar lukefanning commented on June 21, 2024

Hi @dallen98 thanks :). It's been a long time since I looked into this but if I recall correctly there are limitations on how much data can be driven simultaneously through the GPIO pins. However with the introduction of the RPi 4 that may well no longer be the case. I can't really fully explain how you'd need to change the script but it should be fairly straight forward. I guess the most important part is making sure you are writing to the correct channel in the for data loop based on the current pixel index. You would need to consider whether the index was in the correct range i.e. index < LED_COUNT for channel 1 and then index >= LED_COUNT and index < LED_2_COUNT. If you manage to make the changes yourself, you can always paste it here if its not working and I can give it a look over for you.

from rio.

dallen98 avatar dallen98 commented on June 21, 2024

So in the In the rio-server/firmware/rpi/lowlevel-server.py I change that to as below ?

LED_COUNT = 1020 # Number of LED pixels.
LED_PIN = 18 # GPIO pin connected to the pixels (must support PWM!).
LED_FREQ_HZ = 800000 # LED signal frequency in hertz (usually 800khz)
LED_DMA = 5 # DMA channel to use for generating signal (try 5)
LED_BRIGHTNESS = 32 # Set to 0 for darkest and 255 for brightest
LED_INVERT = False # True to invert the signal (when using NPN transistor level shift)
LED_CHANNEL = 0

LED_2_COUNT = 1020 # Number of LED pixels.
LED_2_PIN = 19 # GPIO pin connected to the pixels (must support PWM!).
LED_2_BRIGHTNESS = 32 # Set to 0 for darkest and 255 for brightest
LED_2_INVERT = False # True to invert the signal (when using NPN transistor level shift)
LED_2_CHANNEL = 1

LED_3_COUNT = 1020 # Number of LED pixels.
LED_3_PIN = 19 # GPIO pin connected to the pixels (must support PWM!).
LED_3_BRIGHTNESS = 32 # Set to 0 for darkest and 255 for brightest
LED_3_INVERT = False # True to invert the signal (when using NPN transistor level shift)
LED_3_CHANNEL = 2

LED_4_COUNT = 1020 # Number of LED pixels.
LED_4_PIN = 19 # GPIO pin connected to the pixels (must support PWM!).
LED_4_BRIGHTNESS = 32 # Set to 0 for darkest and 255 for brightest
LED_4_INVERT = False # True to invert the signal (when using NPN transistor level shift)
LED_4_CHANNEL = 3

and in rio-server/config/index.js it changes from...

module.exports = {
matrix: {
width: 60,
height: 34

to ...

module.exports = {
matrix: {
width: 60,
height: 68 ???

and is there anywhere else in rio code that needs changing ??? Thanks Dave

from rio.

dallen98 avatar dallen98 commented on June 21, 2024

I,m trying to understand how many pins I could use as outputs for the led strings on my raspberry pi4 2gb, we already know about pins 18 and 19 used in your code, I see that additionally pins 13 and 16 are marked up on the pinout guide as pwm so that is potentially 4 outputs ??? if we could (optimistically) drive 2040 ws2812b 16mm pitch then (4x2040=) 8160 leds could be driven ? does that sound feasible ? and can any other pins be repurposed to drive even more leds ??

Seperatley it seems that without an internet connection the display stops with these errors..
events.js:165
throw er; // Unhandled 'error' event
^

Error: getaddrinfo EAI_AGAIN pixelwall.herokuapp.com:80
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
Emitted 'error' event at:
at Socket.socketErrorListener (_http_client.js:395:9)
at Socket.emit (events.js:180:13)
at emitErrorNT (internal/streams/destroy.js:64:8)
at process._tickCallback (internal/process/next_tick.js:178:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-04-18T11_57_49_871Z-debug.log
root@raspberrypi:/home/pi/rio/rio-server#

perhaps this line could be altered to change the destroy behaviour ?
at emitErrorNT (internal/streams/destroy.js:64:8)
I have been trying to find where I could edit it, do you know which file I would need to change so the giph continues playing after the internet is lost ??
Thanks

from rio.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.