Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Due: digitalRead of output pin always returns 0, should return pin state for compatibility with '328 version #1597

Closed
Assignees
Labels
Board: Arduino DueApplies only to the Due Component: CoreRelated to the code for the standard Arduino API
@billroy

Description

This program prints '1' on a '328 and '0' on the Due; it should print '1' in both cases:

void setup() {
 pinMode(13,OUTPUT);
 digitalWrite(13, 1);
 Serial.begin(57600);
 Serial.print(digitalRead(13));
}
void loop() {}

Apparently the Due version of digitalRead() does not provide the same behavior as the '328 version where output pins are concerned. If true, this is a backwards compatibility behavior issue.

Please consider the large amount of existing code which depends on legacy behavior and the costs to your users of discovering and fixing these problems one-by-one in the field when prioritizing backwards compatibility and, especially, fixing backwards compatibility bugs.

Thanks guys,

-br
http://bitlash.net

Metadata

Metadata

Assignees

Labels

Board: Arduino DueApplies only to the Due Component: CoreRelated to the code for the standard Arduino API

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /