Activity › Forums › Questions & Troubleshooting › Software & Firmware › Is there something wrong with my Controllino?
-
Is there something wrong with my Controllino?
-
I copy/pased old code with a bug… This two part were fixed…
// put your setup code here, to run once:
pinMode(outputPin, OUTPUT);
pinMode(CONTROLLINO_AO1, OUTPUT);
pinMode(testPin, INPUT);
analogWrite(outputPin, 1);
analogWrite(CONTROLLINO_AO1, 1);
And
// put your setup code here, to run once:
pinMode(outputPin, OUTPUT);
pinMode(13, OUTPUT);
pinMode(testPin, INPUT);
analogWrite(outputPin, 1);
analogWrite(13, 1);
-
Hello Lucko,
I am sorry for a late reply. I have tested your code (also placed below in my comment) with my CONTROLLINO MAXI Automation and it works fine and as expected.
- MAXI is powered from 24VDC
- I measure 0,04 V at AO0
- When I connect 24 V to AI0 then only AI0 LED is ON
- And I can measure 10,09 V at AO0
Please note that I can use value 0 for analogWrite without any problems.
So, maybe there is really something wrong with your device, but it may be also something with your compilation toolchain … please share with us the verbose output of the compilation when you observe the issue with the value 0.
#include <Controllino.h>
int outputPin = 12;
int testPin = A0;
void setup() {
// put your setup code here, to run once:
pinMode(outputPin, OUTPUT);
pinMode(13, OUTPUT);
pinMode(testPin, INPUT);
analogWrite(outputPin, 0);
analogWrite(13, 0);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(testPin)){
analogWrite(outputPin, 255);
analogWrite(13, 255);
}
if (!(digitalRead(testPin))){
analogWrite(outputPin, 1);
analogWrite(13, 1);
}
}Thanks,
Lukas
-
Hi!
At the moment I can use 0 too. No idea what was wrong before. It might be a bug that we had and fixed… So I’m guessing it was me not setting pinMode… I’m more then happy to give you any additional data or screenshots if you need it it or run any program on a unit…
Regards
-
This reply was modified 4 years, 2 months ago by
Lucko.
-
Hi Lucko,
please share with us your test setup wiring – a drawing or photo will be great!
Thanks,
Lukas
-
You got them over the mail… You stopped answering to mails again(web form and “massaging app” on your page) so this is my last attempt before I will ask for my money back and find a different solution.
-
-
This reply was modified 4 years, 2 months ago by
Log in to reply.