-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cant change the start channel #57
Comments
I've not got my test rig in front of me to check this out right now, but can you post your code? Do you have this problem with the example programs? |
Leon,
Thanks for getting back to me.
I am using your sample code to test right now.
I have simply changed the start channel to 10 in this example but the unit
still responds to start channel 1. Am i misunderstanding how it works?
See code below;
/*
* Copyright (c) 2021 Jostein Løwer
*
* SPDX-License-Identifier: BSD-3-Clause
*
* Description:
* Starts a DMX Input on GPIO pin 0 and read channel 1-3 repeatedly
*/
#include <Arduino.h>
#include "DmxInput.h"
DmxInput dmxInput;
#define START_CHANNEL 10
#define NUM_CHANNELS 3
volatile uint8_t buffer[DMXINPUT_BUFFER_SIZE(START_CHANNEL, NUM_CHANNELS)];
void setup()
{
// Setup our DMX Input to read on GPIO 0, from channel 1 to 3
dmxInput.begin(0, START_CHANNEL, NUM_CHANNELS);
// Setup the onboard LED so that we can blink when we receives packets
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
// Wait for next DMX packet
dmxInput.read(buffer);
// Print the DMX channels
Serial.print("Received packet: ");
for (uint i = 0; i < sizeof(buffer); i++)
{
Serial.print(buffer[i]);
Serial.print(", ");
}
Serial.println("");
// Blink the LED to indicate that a packet was received
digitalWrite(LED_BUILTIN, HIGH);
delay(10);
digitalWrite(LED_BUILTIN, LOW);
}
Thanks again
Regards
Michael
…On Thu, Jun 20, 2024 at 11:40 PM Leon Sutliffe ***@***.***> wrote:
I've not got my test rig in front of me to check this out right now, but
can you post your code? Do you have this problem with the example programs?
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ77UNIF5YDWOU66XEPOFTZIPDF5AVCNFSM6AAAAABJU5HLN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGEYDKMJVHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Regards
*Michael*
*916-660-2114*
|
I'm having the same issue--no matter what it it seems to stick to channel 1. |
Taking a look at DmxInput.cpp, it doesn't look like |
The workaround is to read the whole universe into memory (plenty of memory
in the PICO) and read the data you want.
MP
…On Sun, Sep 8, 2024 at 12:27 PM Perry Naseck ***@***.***> wrote:
I'm having the same issue--no matter what it it seems to stick to channel
1.
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ77UKR4WTUQF2ONVJPO4LZVSQLXAVCNFSM6AAAAABJU5HLN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWG44TOMZRGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Regards
*Michael*
*916-660-2114*
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Jostein,
I've been using your library on a small project that I am working on. I works great when the starting channel is 1!
However, I don't seem to be able to move the Start_channel. For instance I would like the starting channel to be 20. When I change the starting channel like so
#define START_CHANNEL 20
#define NUM_CHANNELS 4
Its still working with starting channel as 1.
Is this not supposed to be the way that it works.
I suppose I can try to work around by inputing all 512 channels and then only looking for the channels that I want in the buffer.
Thanks
Michael Pierce
The text was updated successfully, but these errors were encountered: