The button does not work?

This is very strange: I have two LoRaOne’s an the same problem on both of them: When I use the sample tutorial Button to verify the working, the displayed input value is TRUE (1) and the (green) LED stays OFF, no matter the button is pressed or not.

I am using boards version 1.6.8.

What do I overlook?

Axel

I tried the sketch from http://support.sodaq.com/loraone-button/ with a BETA revision board.
It worked on my board. What revision board do you have?

It is Rev 4. 16/19. I used the same sketch.

However, I also tried another older version of the LoRaOne, that had the button implemented. I downloaded an old sketch that was working before and had the same problem: the button did not react anymore.

So I am quite convinced the problem is in the new boards software version . 1.6.7. was working fine, 1.6.8. not. I know there is a change in the initialization of the inputs in order to reduce power consumption.

The changes were only to the numbered digital pins. Additionally, the only issue you would have with the changes from 1.6.8 is if you assume the default state of the pin as INPUT. The above mentioned sketch explicitly sets the pin mode for each of the IO pins it uses.

I tried the sketch again this evening.
I’m using the Arduino IDE version 1.6.8 (on Windows 10) and I installed the SODAQ SAMD core v1.6.8 using: http://downloads.sodaq.net/test/package_sodaq_index.json

I selected the SODAQ LoRaONE Beta as the target board, and the board was USB powered.

The LED functioned correctly with my setup. I’ll try and get a hold of the schema for Rev.4 and I’ll see if there were any other hardware changes.

Edit: I’ve just found out that the BUTTON has been moved to another IO pin in the latest hardware revision. The board files will be updated to reflect this. Unfortunately, it uses a pin that was not connected in the BETA variant, and so it is not possible to just use another label (using the current board files).

Gabriel,

I had exactly the same idea. Downgraded and had the same result.

In the office, I had an older LoRaOne board (first batch I think, no revision number available).

This board is working fine with the same code. As well as on 1.6.7. as well on 1.6.8.

Conclusion: HW problem?

Axel

I added a note to my last main reply. It is not a hardware problem but a hardware change, a change that needs to be added to the board description files.

If you need a temporary fix, replace line 48 of Arduino15/packages/SODAQ/hardware/samd/1.6.8/variants/sodaq_loraone_beta/variant.cpp with:

{ PORTA, 16, PIO_INPUT,      (PIN_ATTR_DIGITAL),                                 No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_0    }, // BUTTON

If you are running Windows the above folder will be located under /Users/USERNAME/AppData/Local/