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.
Fork of Muscle_Controlled_Servo by
main.cpp
- Committer:
- BenRJG
- Date:
- 2018-04-05
- Revision:
- 5:11489c0bd020
- Parent:
- 2:b615682e3e4f
- Child:
- 6:a61b01442f37
File content as of revision 5:11489c0bd020:
#include "FPGA.h"
#include "LCD.h"
#include "ADC.h"
float adval;
char adstr[32];
int err; //error variable used for debugging, trapping etc
int main (void)
{
SPI_INIT();
/*err = 0;
adval =0.0f;
adval = read_adc();
sprintf(adstr,"%.3f",adval); //Store in an array string
lcd_locate(1,8); //and display on LCD
lcd_display(adstr); //
err = bar_graph(((adval/3.3f)*4095)/255); // 16*256 =4096 12 bit ADC!
if (err < 0){printf("Display Overload\r\n");}*/
while(true) //Loop forever Knight Rider Display on FPGA
{
SPI_TEST();
}
}
