Skip to content
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

Misuse of Analog/digital pin functions #1

Open
mwsfreak opened this issue Jul 13, 2020 · 2 comments
Open

Misuse of Analog/digital pin functions #1

mwsfreak opened this issue Jul 13, 2020 · 2 comments

Comments

@mwsfreak
Copy link

There seems to be a major misunderstanding in the use of AnalogWrite and DigitalWrite functions in ATEM_Tally_Receiver.ino

int PROGRAM_PIN = A0;
int PREVIEW_PIN = A1;
int POWER_PIN = A2;

Led pins are set to Analog Input pins (l. 4+7+10). These pins are also capable of outputting digital signals, however not PWM signals.

analogWrite(PROGRAM_PIN, 1023);
analogWrite(PREVIEW_PIN, 1023);
analogWrite(POWER_PIN, 1023);  

Later (l. 50-52), an attempt is made to apparently output af PWM signal on these same pins.

digitalWrite(PREVIEW_PIN, 1023);
digitalWrite(PROGRAM_PIN, 1023);
digitalWrite(POWER_PIN, 1023);

Further down, one attempts to write a value to a digital pin. The digitalwrite function only accepts HIGH and LOW.

The methods used probably works, but it seems quite far from the intended use of the functions.

@kalinchuk
Copy link
Owner

@mwsfreak It may be a mistake. This repo is not being actively maintained. If you create a tested PR, I can merge it into master.

@mwsfreak
Copy link
Author

mwsfreak commented Jul 13, 2020

@mwsfreak It may be a mistake. This repo is not being actively maintained. If you create a tested PR, I can merge it into master.

I can create a PR, but unfortunately I don't have the hardware to test it at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants