parent
e1487d6bb2
commit
8c1400a53c
@ -0,0 +1,95 @@
|
|||||||
|
{
|
||||||
|
"organization": "freeCodeCamp",
|
||||||
|
"website": "https://www.freecodecamp.org/",
|
||||||
|
"formed": 2014,
|
||||||
|
"founder": "Quincy Larson",
|
||||||
|
"certifications": [
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Responsive Web Design",
|
||||||
|
"courses": [
|
||||||
|
"HTML",
|
||||||
|
"CSS"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "JavaScript Algorithms and Data Structures",
|
||||||
|
"courses": [
|
||||||
|
"JavaScript"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Front End Development Libraries",
|
||||||
|
"courses": [
|
||||||
|
"Bootstrap",
|
||||||
|
"jQuery",
|
||||||
|
"Sass",
|
||||||
|
"React",
|
||||||
|
"Redux"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Data Visualization",
|
||||||
|
"courses": [
|
||||||
|
"D3"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Relational Database Course",
|
||||||
|
"courses": [
|
||||||
|
"Linux",
|
||||||
|
"SQL",
|
||||||
|
"PostgreSQL",
|
||||||
|
"Bash Scripting",
|
||||||
|
"Git and GitHub",
|
||||||
|
"Nano"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Back End Development and APIs",
|
||||||
|
"courses": [
|
||||||
|
"MongoDB",
|
||||||
|
"Express",
|
||||||
|
"Node",
|
||||||
|
"NPM"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Quality Assurance",
|
||||||
|
"courses": [
|
||||||
|
"Testing with Chai",
|
||||||
|
"Express",
|
||||||
|
"Node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Scientific Computing with Python",
|
||||||
|
"courses": [
|
||||||
|
"Python"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Data Analysis with Python",
|
||||||
|
"courses": [
|
||||||
|
"Numpy",
|
||||||
|
"Pandas",
|
||||||
|
"Matplotlib",
|
||||||
|
"Seaborn"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Information Security",
|
||||||
|
"courses": [
|
||||||
|
"HelmetJS"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Machine Learning with Python",
|
||||||
|
"courses": [
|
||||||
|
"Machine Learning",
|
||||||
|
"TensorFlow"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
with open('config.json', 'r') as config_file:
|
||||||
|
config_data = json.load(config_file)
|
||||||
|
# print(config_data)
|
||||||
|
# print(json.dumps(config_data, indent=4))
|
||||||
|
print(json.dumps(config_data, indent=4, sort_keys=True))
|
||||||
|
|
@ -1,17 +1,14 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
|
|
||||||
display_s *display;
|
display_s *lcd;
|
||||||
|
|
||||||
void init_lcd(display_s *d)
|
void display_init(display_s *d)
|
||||||
{
|
{
|
||||||
display = d;
|
lcd = d;
|
||||||
|
printf("LCD : Init Ok\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_lcd( int val)
|
void display_print(int val)
|
||||||
{
|
{
|
||||||
display->print(val);
|
lcd->print(val);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,52 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
typedef struct display
|
typedef struct display
|
||||||
{
|
{
|
||||||
int size_x,size_y;
|
int size_x,size_y;
|
||||||
|
void (*enable)();
|
||||||
|
void (*disable)();
|
||||||
|
|
||||||
|
void (*reset_hard)();
|
||||||
|
void (*reset_soft)();
|
||||||
|
|
||||||
|
uint8_t (*is_ready)();
|
||||||
|
|
||||||
|
void (*sleep)();
|
||||||
|
void (*wake)();
|
||||||
|
|
||||||
|
void (*draw_pixel)(uint16_t, uint16_t, uint8_t);
|
||||||
|
void (*draw_line)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t);
|
||||||
|
void (*draw_rectangle)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t, uint8_t);
|
||||||
|
void (*draw_circle)(uint16_t, uint16_t, uint16_t, uint8_t, uint8_t);
|
||||||
|
|
||||||
|
void (*scroll_right)(uint16_t, uint16_t);
|
||||||
|
void (*scroll_left)(uint16_t, uint16_t);
|
||||||
|
|
||||||
|
void (*scroll_up)(uint16_t, uint16_t);
|
||||||
|
void (*scroll_down)(uint16_t, uint16_t);
|
||||||
|
|
||||||
|
void (*set_font)(uint8_t*, uint8_t, uint8_t spacing);
|
||||||
|
void (*print_char)(uint16_t, uint16_t, uint8_t, uint8_t);
|
||||||
|
void (*print_text)(uint16_t, uint16_t, uint8_t, uint16_t, uint8_t);
|
||||||
|
void (*print_cursor)(uint8_t);
|
||||||
|
|
||||||
|
void (*goto_pos)(uint16_t, uint16_t);
|
||||||
|
|
||||||
|
uint8_t (*display)();
|
||||||
|
uint8_t (*clear)();
|
||||||
|
|
||||||
|
void (*change_brightness)(uint8_t);
|
||||||
|
void (*change_contrast)(uint8_t);
|
||||||
|
|
||||||
|
void (*rotate)(uint8_t);
|
||||||
|
void (*inverse)(uint8_t);
|
||||||
|
void (*invert)(uint8_t);
|
||||||
void (*print)(int);
|
void (*print)(int);
|
||||||
} display_s;
|
} display_s;
|
||||||
|
|
||||||
void init_lcd(display_s *d);
|
void display_init(display_s *d);
|
||||||
void print_lcd(int val);
|
void display_print(int val);
|
||||||
|
|
||||||
|
@ -1,19 +1,16 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "ui.h"
|
||||||
|
|
||||||
#include "oled.h"
|
|
||||||
|
display_s display;
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
oled_init(&display);
|
||||||
display_s display = oled_init();
|
display_init(&display);
|
||||||
init_lcd(&display);
|
ui_print_number(50);
|
||||||
|
display_print(10);
|
||||||
void (*print_ptr)(int) = &oled_print;
|
return 0;
|
||||||
|
|
||||||
(*print_ptr)(20);
|
|
||||||
display.print(40);
|
|
||||||
print_lcd(10);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,18 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "oled.h"
|
#include "oled.h"
|
||||||
|
|
||||||
|
|
||||||
void oled_print(int a)
|
void oled_print(int a)
|
||||||
{
|
{
|
||||||
printf("Value of a is %d\n", a);
|
printf("oled_print(int a) : %d\n", a);
|
||||||
}
|
}
|
||||||
|
|
||||||
display_s oled_init()
|
void oled_init(display_s *lcd)
|
||||||
{
|
{
|
||||||
display_s *lcd = malloc(sizeof(display_s));
|
|
||||||
lcd->size_x = 10;
|
lcd->size_x = 10;
|
||||||
lcd->size_y = 20;
|
lcd->size_y = 20;
|
||||||
lcd->print = &oled_print;
|
lcd->print = &oled_print;
|
||||||
|
|
||||||
printf("LCD_OLED : Init Ok\n");
|
printf("LCD_OLED_REG : Init Ok\n");
|
||||||
return *lcd;
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
|
|
||||||
display_s oled_init();
|
void oled_init(display_s *lcd);
|
||||||
void oled_print(int a);
|
void oled_print(int a);
|
||||||
|
|
||||||
|
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
#include "ui.h"
|
||||||
|
|
||||||
|
void ui_print_number(int num)
|
||||||
|
{
|
||||||
|
printf("UI : Init Ok\n");
|
||||||
|
display_print(33);
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "oled.h"
|
||||||
|
|
||||||
|
void ui_print_number(int num);
|
||||||
|
void ui_init();
|
||||||
|
|
Loading…
Reference in new issue