Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit3f1bdb7ef2253d4e1a6cecdb8ff50a1415950a29 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-05-23 07:53:15 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-05-23 07:53:15 +0300
Files3b8f68925bb91295a94edb6e9560c0e1dff57b27
uni-projects-3f1bdb7ef2253d4e1a6cecdb8ff50a1415950a29.tar
uni-projects-3f1bdb7ef2253d4e1a6cecdb8ff50a1415950a29.tar.gz
uni-projects-3f1bdb7ef2253d4e1a6cecdb8ff50a1415950a29.zip
Parent8af883ce66cb3fd2a320ed67cf34f55d79863dff (diff)
[iot/goam] Print local IP address
diff --git a/Year 3/Internet of things/goam/main/display.c b/Year 3/Internet of things/goam/main/display.c
index dbe9abd..e3eb96b 100644
--- a/Year 3/Internet of things/goam/main/display.c
+++ b/Year 3/Internet of things/goam/main/display.c
@@ -132,7 +132,7 @@ void display_example() {
// MUST be separated, for some reason
/* send(CMD_STREAM, &off, 1); */
/* display_print(""); */
- /* display_print("A0 "); */
+ display_print("A0 ");
/* display_print(""); */
/* for (int i = 0; i < 16; i++) { */
/* out_page_row[i] = bitpixel_chars[1][(i * 2) % 16]; */
diff --git a/Year 3/Internet of things/goam/main/display.h b/Year 3/Internet of things/goam/main/display.h
index 0584727..0fcae86 100644
--- a/Year 3/Internet of things/goam/main/display.h
+++ b/Year 3/Internet of things/goam/main/display.h
@@ -13,3 +13,4 @@ void display_invertion(enum Inversion inv_byte);
/* clang-format on */
void display_example();
+void display_print(const char* str);
diff --git a/Year 3/Internet of things/goam/main/ibm-vga-8x16.c b/Year 3/Internet of things/goam/main/ibm-vga-8x16.c
index 6ce68f1..7c88790 100644
--- a/Year 3/Internet of things/goam/main/ibm-vga-8x16.c
+++ b/Year 3/Internet of things/goam/main/ibm-vga-8x16.c
@@ -34,6 +34,116 @@ const uint8_t n0[16] = {
COL(0000000000000000)
};
+const uint8_t n1[16] = {
+ COL(0000000000000000)
+ COL(0000100000100000)
+ COL(0000100000110000)
+ COL(0000111111111000)
+ COL(0000111111111000)
+ COL(0000100000000000)
+ COL(0000100000000000)
+ COL(0000000000000000)
+};
+
+const uint8_t n2[16] = {
+ COL(0000110000010000)
+ COL(0000111000011000)
+ COL(0000101100001000)
+ COL(0000100110001000)
+ COL(0000100011001000)
+ COL(0000110001111000)
+ COL(0000110000110000)
+ COL(0000000000000000)
+};
+
+const uint8_t n3[16] = {
+ COL(0000010000010000)
+ COL(0000110000011000)
+ COL(0000100010001000)
+ COL(0000100010001000)
+ COL(0000100010001000)
+ COL(0000111111111000)
+ COL(0000011101110000)
+ COL(0000000000000000)
+};
+
+const uint8_t n4[16] = {
+ COL(0000000110000000)
+ COL(0000000111000000)
+ COL(0000000101100000)
+ COL(0000100100110000)
+ COL(0000111111111000)
+ COL(0000111111111000)
+ COL(0000100100000000)
+ COL(0000000000000000)
+};
+
+const uint8_t n5[16] = {
+ COL(0000010011111000)
+ COL(0000110011111000)
+ COL(0000100010001000)
+ COL(0000100010001000)
+ COL(0000100010001000)
+ COL(0000111110001000)
+ COL(0000011100001000)
+ COL(0000000000000000)
+};
+
+const uint8_t n6[16] = {
+ COL(0000011111100000)
+ COL(0000111111110000)
+ COL(0000100010011000)
+ COL(0000100010001000)
+ COL(0000100010001000)
+ COL(0000111110000000)
+ COL(0000011100000000)
+ COL(0000000000000000)
+};
+
+const uint8_t n7[16] = {
+ COL(0000000000011000)
+ COL(0000000000011000)
+ COL(0000111100001000)
+ COL(0000111110001000)
+ COL(0000000011001000)
+ COL(0000000001111000)
+ COL(0000000000111000)
+ COL(0000000000000000)
+};
+
+const uint8_t n8[16] = {
+ COL(0000011101110000)
+ COL(0000111111111000)
+ COL(0000100010001000)
+ COL(0000100010001000)
+ COL(0000100010001000)
+ COL(0000111111111000)
+ COL(0000011101110000)
+ COL(0000000000000000)
+};
+
+const uint8_t n9[16] = {
+ COL(0000000001110000)
+ COL(0000100011111000)
+ COL(0000100010001000)
+ COL(0000100010001000)
+ COL(0000110010001000)
+ COL(0000011111111000)
+ COL(0000001111110000)
+ COL(0000000000000000)
+};
+
+const uint8_t n10[16] = {
+ COL(0000000000000000)
+ COL(0000000000000000)
+ COL(0000000000000000)
+ COL(0000000000000000)
+ COL(0000000000000000)
+ COL(0000000000000000)
+ COL(0000000000000000)
+ COL(0000000000000000)
+};
+
/* const uint8_t A[] = { */
/* 0b11100000, 0b00001111, */
/* 0b11110000, 0b00001111, */
@@ -47,6 +157,16 @@ const uint8_t n0[16] = {
const uint8_t* bitpixel_chars[256] = {
['0'] = n0,
+ ['1'] = n1,
+ ['2'] = n2,
+ ['3'] = n3,
+ ['4'] = n4,
+ ['5'] = n5,
+ ['6'] = n6,
+ ['7'] = n7,
+ ['8'] = n8,
+ ['9'] = n9,
['A'] = A,
[' '] = space,
+ ['.'] = space,
};
diff --git a/Year 3/Internet of things/goam/main/main.c b/Year 3/Internet of things/goam/main/main.c
index 0378413..1524449 100644
--- a/Year 3/Internet of things/goam/main/main.c
+++ b/Year 3/Internet of things/goam/main/main.c
@@ -112,18 +112,18 @@ void app_main(void)
buttons_init();
add_push_button(BTN_SHOOT_PIN, take_photo, NULL);
+ display_init();
+
// This is really slow
wifi_init();
webserver_init();
wifi_start(); // Automatically starts server too
- int notification = 0;
+ long unsigned int notification = 0;
while (!(notification & INIT_CAMERA_BIT)) {
xTaskNotifyWait(0, 0, &notification, 50 / portTICK_PERIOD_MS);
}
- // TODO: move before notification wait
- display_init();
display_example();
for (int i = 0; true; i++) {