esp8266 / Basic

Basic Interpreter for the ESP8266
http://esp8266basic.com
258 stars 217 forks source link

Fix for the pin 16 i/o crash #23

Closed cicciocb closed 8 years ago

cicciocb commented 8 years ago

When the pin 16 is used with the command po 16 0 or po 16 1, the ESP basic crashes. After some check I found that the bug comes from the declaration of these 2 arrays in ESP8266Basic.ino. The lines are 401 and 402 :
String PinListOfStatus[16];
int PinListOfStatusValues[16]; The index should be 17 because the pins goes from 0 to 16 (so 17 elements). The lines should be : String PinListOfStatus[17]; // 0 to 16 - fix the po 16 0 crash int PinListOfStatusValues[17]; // 0 to 16

mmiscool commented 8 years ago

Fix added