Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos TextLCD
SETUP.hpp
- Committer:
- JDickson
- Date:
- 2019-03-01
- Revision:
- 27:22d6fd88828e
- Parent:
- 26:83550fc299aa
- Child:
- 28:3193157ebb0c
File content as of revision 27:22d6fd88828e:
#ifndef SETUP_HPP//Header Guards Prevents Multiple includes
#define SETUP_HPP
#include "stdio.h"
#include "string.h"
#include "mbed.h"
#include "rtos.h"
#include "TextLCD.h"
#include "iostream"
#include "rtos.h"
#include "STEPPER_MOTOR.hpp"
#include "Interface.hpp"
#define Debounce_Time 100//200 works fine
INTERFACE INTERFACE;
//Digital Outputs
DigitalOut led1(LED1);
DigitalOut led2(LED2);
//Function forward declarations
void up_thread_function();
void down_thread_function();
void start_thread_function();
void function_thread_function();
void select_thread_function();
void Polling_thread_function();
//Thread Setups
Thread polling_thread;
Thread lcd_thread;
Thread led_thread;
Thread up_thread;
Thread down_thread;
Thread start_stop_thread;
Thread function_thread;
Thread select_thread;
//LCD pin connections
TextLCD lcd(D0,D1,D4,D5,D6,D7); // rs, e, d4-d7
//Serial Terminal setup for debugging
Serial pc(USBTX, USBRX); //Define serial namespace so the serial comms can be printed to
#endif