Python code for the core raspberry pi