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

Some analog ports missing on atmelsam (adafruit_feather_m0_usb) #2

Closed
bcr opened this Issue Aug 18, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@bcr

bcr commented Aug 18, 2016

What kind of issue is this?

  • Bug report. If you’ve found a bug, please provide information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system:

Blakes-MacBook:~ blake$ uname -a
Darwin Blakes-MacBook 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
Blakes-MacBook:~ blake$ sw_vers -productVersion
10.11.6

PlatformIO Version (platformio --version):

Blakes-MacBook:~ blake$ platformio --version
PlatformIO, version 2.11.2

Description of problem

There appear to be some special analog input ports that are not defined in the PlatformIO environment, but are defined in the Adafruit boards for the Arduino IDE. I am specifically using the Adafruit Feather M0 Bluefruit LE and the desired pin is analog pin 7 which is defined in the Arduino IDE as A7.

The Adafruit boards I installed were from https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

Steps to Reproduce

  1. Attempt to access analog pin A7. For instance, analogRead(A7);

Actual Results

src/main.cpp:69:16: error: 'A7' was not declared in this scope
[ ERROR ] Took 6.95 seconds

Expected Results

[SUCCESS] Took 7.87 seconds

If problems with PlatformIO Build System:

The content of platformio.ini:

#
# PlatformIO Project Configuration File
#
# Please make sure to read documentation with examples first
# http://docs.platformio.org/en/stable/projectconf.html
#
[env:adafruit_feather_m0_usb]
platform = atmelsam
framework = arduino
board = adafruit_feather_m0_usb

Source file to reproduce issue:

void setup() {
  // put your setup code here, to run once:
  analogRead(A7);
}

void loop() {
  // put your main code here, to run repeatedly:

}

Additional info

Adafruit Feather M0 Bluefruit LE tutorial

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Aug 18, 2016

Member

@valeros please check it

Member

ivankravets commented Aug 18, 2016

@valeros please check it

valeros added a commit that referenced this issue Aug 19, 2016

@valeros

This comment has been minimized.

Show comment
Hide comment
@valeros
Member

valeros commented Aug 22, 2016

Hi @bcr ! Fixed in development branch.

@bcr

This comment has been minimized.

Show comment
Hide comment
@bcr

bcr Aug 22, 2016

Seems to be working great, thank you!

bcr commented Aug 22, 2016

Seems to be working great, thank you!

@bcr bcr closed this Aug 22, 2016

@deladriere

This comment has been minimized.

Show comment
Hide comment
@deladriere

deladriere Jan 31, 2017

It was working fine but now I cannot use Analog 6 or 7 anymore

void setup() {
  // put your setup code here, to run once:
  analogRead(A7);
}

void loop() {
  // put your main code here, to run repeatedly:

}

it gives : error: 'A7' was not declared in this scope

#2

deladriere commented Jan 31, 2017

It was working fine but now I cannot use Analog 6 or 7 anymore

void setup() {
  // put your setup code here, to run once:
  analogRead(A7);
}

void loop() {
  // put your main code here, to run repeatedly:

}

it gives : error: 'A7' was not declared in this scope

#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment