ELEC2645 - Embedded Systems Project - 'Sensor-matic!'
The aim of the project is to create an interface between a distance and a temperature sensor and an LCD screen.
**Specification to follow...**
Week 19:
I made some initial mock-ups of the each screen and arranged them in terms of the navigation with connecting arrows.
A potentiometer will be used to change which box is selected and two buttons will be used to navigate forward and backward between the screens. For the sensor screens, a thermometer will change depending on the temperature output. Similarly for the distance sensor, the boxes will fill in as the distance increases.
This week I focussed on creating the splash screens. The code could be adapted from the Game of Life simulation (created for ELEC1620 in Level One).
void welcomeScreen() // Prints Welcome Message on Screen for 2 Seconds
{
// printString is a function from N5110.h
screen.printString("ELEC2645", 20, 0); // Format: screen.printString("Text", Number of Pixels 'in' (X-Position), Bank Number (Y-Position))
screen.printString("Sensor-matic!", 5, 2);
screen.printString("By", 35, 4);
screen.printString("Jack Berriman", 3, 5);
wait(2); // Delay so text stays long enough to read
} // End of welcomeScreen Function
Each screen was adapted so that the text was perfectly centred and displayed the relevant information. A void for every screen was created and the position of the 'selector square' is changed in each void - i.e. a new void was created for each different position of the selector square. The 'selector square' was created using the 'drawRect()' function by inputting the X and Y start point and how deep the square is in the X and Y direction.
Below are pictures taken of the Nokia 5110 LCD screen with the output:
The screens for the distances and temperature sensor screens have not been created yet. It is task that will hopefully be finished at the end of Week 20. Overall, the screens are relatively consistent with the mock-ups.
The final specifications for the project will be posted by the end of next week.