Avoid Switch S1

Hi All,

I am trying to program my TRek1000 kit avoiding the Switch1 which gives the ID address and function role to the board (Tag or anchor). I have been able to program this role in the software giving to the GPIO_Pin_4 the desired value (0 or 1) but, when I try to modify the ID address using this method, the “ERROR INIT FAIL” message appears in the LCD screen.

I have tried to delete all the unnecesary code for this but I have not been able to get this goal. Also I have tried to modify this section

s1switch = is_button_low(0) << 1 // is_switch_on(TA_SW1_2) << 2
| is_switch_on(TA_SW1_3) << 2
| is_switch_on(TA_SW1_4) << 3
| is_switch_on(TA_SW1_5) << 4
| is_switch_on(TA_SW1_6) << 5
| is_switch_on(TA_SW1_7) << 6
| is_switch_on(TA_SW1_8) << 7;

and replace all the “is_switch_on(TA_SW1_X)” for the corresponding GPIO_Pin_X but still not working.

Does anybody knows how can I proceed?

Thank you!

[size=small]Hi ,[/size]

[size=small]INIT ERROR fails can be a number of things but the most common is the dip switch S2 failing[/size]
[size=small]Please check the schematic (or TREK user manual) for setting.[/size]

[size=small]You[/size][size=small] could also look at the sample / example code and built on from that as S1 functionality is not applied in the example sample code. Example code can be downloaded from [/size]here[size=small][/size]