Select Page

The task of the day was to change the current way of device data to be object oriented in Javascript. Learned about an old way to make Javascript objects (ES5), then learned about the new way to do so with classes (ES6). Created a device class in a separate device javascript file. Transferred the variables, changed the calls to the variables in the main sketch, and same with the functions. Everything is working! As well, changed all the var (function scope) variables to let (block scope). Pretty simple. This Device class will evolve over time. The next step is to process additional data logs from Bowie, and have them displayed on the map as instances of the object.