开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: uBit Crazy Software Problem


 

Many programmers are not aware of this, but on a Nano pins A6 and A7 are
ANALOG INPUT only.

73 Allard PE1NWL

On Mon, March 5, 2018 19:10, Michael Hagen wrote:
Simple problem and I am stumped!

I wrote some test sketches to test the Analog Pins that are on the 8 Pin
molex?? called "Controls" on uBit.

Well on all 5 Nanos I have here, A6 and A7 don't want to flip. A really
puzzling thing is I have an old Mega 2560 (the one with the old USB
squarish plug), and its

A6 and A7 will toggle?

I learned one good thing in hours of fussing around.?? I did NOT know you
can use a Pin name in the sketch without "A" in front of it.

They simply call the ports up from the last digital pin (13), So A0 you
can call 14!!!?? WOW, never knew that.

What is it good for????? You can use for statements to increment a
counter (i) to initialize and address these pins.?? You don't have to put
A in there.



Please Help Me, I am going nuts!

Mike, WA6ISP

Here is a test of A0 - A7,?? MY A6 & A7 won't toggle on my Nanos?


//
// Test A0 - A7
byte i = 0;

void setup()?? {

for (int i=14; i<22; i++)?? {
???? pinMode(i, OUTPUT);
???? digitalWrite(i, HIGH);

}

}
void loop() {

?? for (int i=14; i<22; i++) {

?? digitalWrite(i, LOW);
?? delay(100);
?? digitalWrite(i, HIGH);
?? delay(100);
?? }


}


--
Mike Hagen, WA6ISP
10917 Bryant Street
Yucaipa, Ca. 92399
(909) 918-0058
PayPal ID "MotDog@..."
Mike@...




Join [email protected] to automatically receive all group messages.