June 2017
Intermediate to advanced
232 pages
5h 4m
English
It is time to put everything together and start acquiring data. By now, we have implemented:
Let us glue all the pieces and make our app work. Open MainActivity.java again and in the onCreate method add the following lines:
callback = new BMX280Callback(); sensorManager.registerDynamicSensorCallback(callback); try { mySensorDriver = new Bmx280SensorDriver(BoardPins.getSDAPin()); mySensorDriver.registerTemperatureSensor(); mySensorDriver.registerPressureSensor();}catch(Throwable t) { t.printStackTrace();}
Where mySensorDriver is an instance of Bmx280SensorDriver that handles the communication ...
Read now
Unlock full access