# 04-16 Models and Webservices
First I will describe why I discarded my Console Class branch. Then I will briefly touch upon my upgrade to the newest Arduino IDE Version. Lastly I will talk about my strategy about how to get a good position refresh rate in the long run.
Today I decided to give up on branch rewrite to classes because I couldnt get the console to work. The build was successful but the code didn't work. Something about the branch was broken, since even trying to use pinMode(TFT_BL, OUTPUT); digitalWrite(TFT_BL, HIGH); directly in the setup code (so not related to my code didnt work). I decided that the effort to look into this was not worth it.
Having to build and upload my executables every time to the arduino slows down the development process a lot. I switched to Arduino IDE Version 1.8.12 because I though that it might improve compile time and fix library finding issues. It is only marginally faster if at all and writing to local storage still takes 83s on average.
My goal is for the positioning to have refresh rate of 1 Hz. Every second the position is updated. I thought the scanner implementation of the BLE Scanner library bottlenecks this because the param that defines the scan duration allows only for ints. That would mean that I could only sample the RSSI once a second which would be terrible if I want to use filtering on the data. For good results one obviously needs as many measurements as possible to reduce the measurement error. It then occured to me that I should just advertise the beacons in 10ms intervals instead of trying to scan every 10ms. The scanner will get the same results and can push the scan result back to a "measurement queue" vector, that will be uploaded at a rate of like 4 hz and subsequently cleared. This allows me to upload 4 bundles of 25 measurements each every second, filter these and then maybe take the mean or something.
I successfully secured an https connection to my backend and set up the automatic registration of a client on startup.
Successful connection by ESP32 in Apache Access Log
