Skip to content

Instantly share code, notes, and snippets.

View OrsoEric's full-sized avatar
💭
Robot Mode: ON

Orso Eric OrsoEric

💭
Robot Mode: ON
View GitHub Profile
@OrsoEric
OrsoEric / human.h
Created January 24, 2019 06:52
Parent Class Header
/****************************************************************************
** Parent Class
** Human
*****************************************************************************
** PARAMETER:
** RETURN:
** DESCRIPTION:
****************************************************************************/
class Human
@OrsoEric
OrsoEric / Human.cpp
Created January 24, 2019 07:05
Parent Class Implementation
/****************************************************************************
** Empty constructor
**
*****************************************************************************
** PARAMETER:
** RETURN:
** DESCRIPTION:
****************************************************************************/
Human::Human( void )
/****************************************************************************
** Empty Constructor
** Student | void
*****************************************************************************
** PARAMETER:
** RETURN:
** DESCRIPTION:
****************************************************************************/
Student::Student( void )
@OrsoEric
OrsoEric / Student.h
Created January 24, 2019 07:10
Derived Class Header
/****************************************************************************
** Derived Class
** Student
*****************************************************************************
** PARAMETER:
** RETURN:
** DESCRIPTION:
** Class Student inherit from class Human
** A student is a special type of human
****************************************************************************/
//Decide if i'm using the D0-D3 or D4-D7 of the LCD port in 4BIT mode
//NOTE: Enable only one of the following defines
//#define LCD_PORT_HIGH
#define LCD_PORT_LOW
//DATA - LCD DATA PORT
#define LCD_PORT PORTA
//RS - LCD Register Select
#define RS_PORT PORTA
#define RS_PIN PA4
int main(void)
{
//Main Loop
for EVER
{
///----------------------------------------------------------------------
/// LCD Display Driver
///----------------------------------------------------------------------
// Sync the display content with the user structure
@OrsoEric
OrsoEric / init.cpp
Last active February 16, 2019 08:28
int init(void)
{
//LCD Port Config
//PA0 : LCD_D4
//PA1 : LCD_D5
//PA2 : LCD_D6
//PA3 : LCD_D7
//PA4 : LCD_RS
//PA5 : LCD_EN
//PA6 :
#ifndef AT_LCD_H
//header envroiment variabile, is used to detect multiple inclusion
//of the same header, and can be used in the c file to detect the
//included library
#define AT_LCD_H
/****************************************************************************
** ENVROIMENT VARIABILE
****************************************************************************/
/****************************************************************************
** ORANGEBOT PROJECT
*****************************************************************************
** Library to make use of lcd display in 4bit or 8bit mode
** The library is interrupt based to reduce the MPU consumption
*****************************************************************************
** Author: Orso Eric
** Creation Date:
** Last Edit Date:
** Revision:
@OrsoEric
OrsoEric / node.js
Created June 9, 2019 06:01
2019-06-09 Maze Runner Html+Websocket Webserver
//operating system library. Used to get local IP address
var os = require("os");
//file system library. Used to load file stored inside back end server (https://nodejs.org/api/fs.html)
var fs = require("fs");
//http system library. Handles basic html requests
var http = require("http").createServer(http_handler);
//url library. Used to process html url requests
var url = require("url");
//Websocket
var io = require("socket.io")(http);