Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
86duino SDK for linux - using external interrupt
2020 年 06 月 01 日
20:34:08
pongraczi
Hungary
Moderator
Forum Posts: 26
Member Since:
2015 年 02 月 11 日
Offline

Hi,

I tried to use the rc-switch library with the SDK under linux, I can compile it with the latest SDK from github, but it seems, the external interrupt does not work or not in the way, as I imagined. (RCswitch only depends on external interrupts.)

RCSwitch is a library which handles cheap RF433.92 (etc.) RF receivers/transmitters. Details here: https://github.com/sui77/rc-switch

The example code is working with 86duino in 86duino mode, but seems not working the same under linux+SDK.

My question, how can I get external interrupt work on linux/sdk, because it seems I failed to use it?

Thanks,
István

2020 年 07 月 24 日
05:22:08
pongraczi
Hungary
Moderator
Forum Posts: 26
Member Since:
2015 年 02 月 11 日
Offline

Hi,
I did a test using a simple program, shown below.
It just not work.
I assume somehow the external interrupts does not work in the SDK.

Sample program:
------------------------- 8< -------------------------
#include

const byte ledPin = LED_BUILTIN;
const byte interruptPin = 42;
volatile byte state = LOW;

void blink() {
state = !state;
}

void setup() {
pinMode(ledPin, OUTPUT);
pinMode(interruptPin, INPUT);
attachInterrupt(0, blink, CHANGE);
}

void loop() {
digitalWrite(ledPin, state); delay(1);
}

int main() {
setup();
while (1)
loop();
}

2020 年 07 月 24 日
21:52:03
pongraczi
Hungary
Moderator
Forum Posts: 26
Member Since:
2015 年 02 月 11 日
Offline

Long story short:
it seems the external interrupts are working on the SDK.

Long story long: https://github.com/roboard/86Duino_Linux_SDK/issues/1

Forum Timezone: Asia/Taipei

Most Users Ever Online: 229

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Dinosaur: 27

leutenecker: 13

mrZagg: 10

hippy: 9

smeezekitty: 8

lukeross: 8

tomka: 8

Ekkehard: 8

UIdahoCIT: 8

blaxxun: 7

Member Stats:

Guest Posters: 0

Members: 1578

Moderators: 15

Admins: 5

Forum Stats:

Groups: 2

Forums: 11

Topics: 248

Posts: 1114

Newest Members: DopeFiette, modtra, alan1974, Sergeyfup, mitunsclusa, Dennissot, bb4000, Ovendaanalolymn, Ling ChengYU, EROGurnedo

Moderators: Glaux: 70, uaa: 11, guigra: 17, asian55: 22, Android_Lin: 228, bcarroll: 12, cucubutter: 84, recycled-air: 12, stevemork: 16, zerozaber: 52, pongraczi: 26, jejump: 14, George Andrews III: 56, poto: 11, garpastym: 20

Administrators: eveshih: 1, anthony: 31, viky6: 0, roboard: 135, hcl: 1