diff --git a/README.md b/README.md index 806dffa..e6d6bed 100644 --- a/README.md +++ b/README.md @@ -84,26 +84,21 @@ time_now = output->tmst for train in output->ctatt->route->0->train: # 'train' will now refer to the first train in the folder, aka 0. # So we can save the next stop of the train - statiom_eta[next_stop] = train->nextStaId + next_stop = train->nextStaId # The time of the next stop - time_to_stop = train->arrT - # Get the time difference. - time_eta = time_to_stop - time_now - # In our made up language, this is going to be in seconds. - time_eta_mins = time_eta / 60 - - # Now we can update the station array from earlier - stations_eta[next_stop] = time_eta_mins + station_eta[next_stop] = train->arrT # The loop will now run again, but next time it will refer to the second train (aka 1) # We now have an array of all stations and the next train to arrive at them. For the ones with none any time soon, they'll still be 999 minutes away. print(stations_eta[40380]) ----> 6 +---> 2026-06-06 12:11:14 print(stations_eta[40390]) ----> 11 +---> 2026-06-06 12:13:14 + +# This data can now be used to toggle LEDs based on the desired behavior. ``` ### ESP32 Implementation