Code for arduino for a BME type project.