fix images and docs
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 103 KiB |
@@ -1,11 +1,11 @@
|
|||||||
# interface and application programming
|
# interface and application programming
|
||||||
|
|
||||||
For this week I wanna make use of the Oled display on the controller I designed
|
For this week I wanna make use of the Oled display on the controller I designed
|
||||||

|

|
||||||
|
|
||||||
I've seen a lot of small devices have GUI's using these displays like this. and I've always been interested in making one of these.
|
I've seen a lot of small devices have GUI's using these displays like this. and I've always been interested in making one of these.
|
||||||
|
|
||||||

|

|
||||||
Credits: https://www.youtube.com/watch?v=HVHVkKt-ldc
|
Credits: https://www.youtube.com/watch?v=HVHVkKt-ldc
|
||||||
|
|
||||||
I am going to use that video and try to make a library out of it so it is modular and easy to use for other people.
|
I am going to use that video and try to make a library out of it so it is modular and easy to use for other people.
|
||||||
@@ -18,7 +18,7 @@ I first started out going to their description and downloading their program to
|
|||||||
## Creating the graphics
|
## Creating the graphics
|
||||||
The guy in the video used photopea to create the graphics since you can easily export them as bitmaps and bitmaps can instantly be shown on the display using the screen's library
|
The guy in the video used photopea to create the graphics since you can easily export them as bitmaps and bitmaps can instantly be shown on the display using the screen's library
|
||||||
|
|
||||||

|

|
||||||
He first started out making the menu components each in different layers
|
He first started out making the menu components each in different layers
|
||||||
|
|
||||||
For now I am going to use his graphics since I am porting the program to a new library.
|
For now I am going to use his graphics since I am porting the program to a new library.
|
||||||
@@ -26,29 +26,29 @@ For now I am going to use his graphics since I am porting the program to a new l
|
|||||||
|
|
||||||
## Updating to the new library
|
## Updating to the new library
|
||||||
I first opened an example of the new library (u8g2). In there I needed to select the screen I used.
|
I first opened an example of the new library (u8g2). In there I needed to select the screen I used.
|
||||||

|

|
||||||
If you don't know which screen you have it's best to give AI this list and describe your screen as best as you can and ask which one it thinks it is.
|
If you don't know which screen you have it's best to give AI this list and describe your screen as best as you can and ask which one it thinks it is.
|
||||||
|
|
||||||
After I uploaded the code this popped up.
|
After I uploaded the code this popped up.
|
||||||

|

|
||||||
So it worked!
|
So it worked!
|
||||||
|
|
||||||
|
|
||||||
Now it's time to patch up the old program.
|
Now it's time to patch up the old program.
|
||||||
I first copied the display initializer and updated the library include.
|
I first copied the display initializer and updated the library include.
|
||||||

|

|
||||||
|
|
||||||
Then I got a lot of compile errors at the drawbitmap function
|
Then I got a lot of compile errors at the drawbitmap function
|
||||||

|

|
||||||
I went into the reference of the library and searched for a similar function.
|
I went into the reference of the library and searched for a similar function.
|
||||||
|
|
||||||

|

|
||||||
Luckily I found one and the only thing I needed to do was remove a `P` at each of these function calls and pray nothing in the parameters of the function changed.
|
Luckily I found one and the only thing I needed to do was remove a `P` at each of these function calls and pray nothing in the parameters of the function changed.
|
||||||
|
|
||||||

|

|
||||||
After that it successfully uploaded and now it works!
|
After that it successfully uploaded and now it works!
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Using the joysticks
|
## Using the joysticks
|
||||||
@@ -99,7 +99,7 @@ hardJoystickValues GUIParser(){
|
|||||||
```
|
```
|
||||||
A portion of this code was taken from the machining week group project. But what this does is if a joystick is pressed outside of the deadzone it will set one of the variables to true and if its center everything is false so that way I could use it as a button.
|
A portion of this code was taken from the machining week group project. But what this does is if a joystick is pressed outside of the deadzone it will set one of the variables to true and if its center everything is false so that way I could use it as a button.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
???
|
???
|
||||||
```cpp
|
```cpp
|