Hello,
I am doing a project which consists of having 9 cubes that form a puzzle. When a cube is positioned correctly it emits a green light, otherwise a red light. How can it be possible for a specific cube to know whether or not is in the right position?
p.s I'm a beginner in Arduino.
Thank you in advance!

Which I know is totally wrong. I cannot seem to figure out how to "tell" which value is for temperature, which for humidity since all it does is output it as a string and I want to save it into csv file or a database.