SM6FHX
December 19, 2020, 6:08pm
1
Hello, i’m building a balancing robot using the Redboard Artemis and a MPU-6050 using stepper motors.
Steppers is driven by a Dual Stepper Motor Driver Shield for Arduino (3.3volt).
Everything works with core version 1.2.1. But i want to use the BLE for control so upgraded to version 2.0.3.
The driver board use A0 and A2 for enable signal for the steppers. Now only pin A0 works. A2 is low and does not
disable the driver when it falls.
Did some testing with a small program going back to 1.2.1 . Now all pins A0 to A5 responds on digitalwrite high and low.
Back to 2.0.3 and only A0 would respond to a digitalwrite.
Found a topic that mention something like this, but it give no answers.
Best regards
Ken
I have been having terrible luck uploading a sketch. It initially was able to upload (I am using the ASB as the SVL was giving USB ports, resetting the Artemis, and powering down and up with the.That being said I find it unusual that your RedBoard Artemis Nano You can post new topics in this forum
[Paycheckrecords ](https://www.paycheckrecords.bid/ )
SM6FHX
December 25, 2020, 8:47pm
3
Hello again.
Found the problem in the ‘pins.cpp’ file. There was only 17 pins and the redboard artemis have 22.
So added those into the file, and now it works OK.
So if you have problems with the ‘arduino uno’ clone of artemis, this may be the problem
on A1 to A5 analog ports.
Regards
Ken
paulvha
December 28, 2020, 7:59pm
4
the definition of the ADC pins is missing in many of the variants. below an example of how to define and read/ test the different ADC channels correctly. (tested on ATP as it has all the pins)
// define the pins on the Apollo3
// name pin
#define A0 16
#define A1 29
#define A2 11
#define A3 31
#define A4 32
#define A5 33
#define A6 34
#define A7 35
int ADCpins[] = {A0,A1,A2,A3,A4,A5,A6,A7};
void setup() {
Serial.begin(115200);
while(! Serial);
Serial.println("\rRead analog");
Serial.println(sizeof(ADCpins)/sizeof(ADCpins[0]));
}
void loop() {
static uint8_t ind = 0;
int pin = ADCpins[ind];
Serial.print("A");
Serial.print(ind);
Serial.print(" Pin ");
Serial.print(pin);
Serial.print(" ");
Serial.println(analogRead(pin));
ind++;
if(ind == sizeof(ADCpins)/sizeof(ADCpins[0])) {
Serial.println();
ind = 0;
}
delay(2000);
}