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
Diff: main.cpp
- Revision:
- 5:11489c0bd020
- Parent:
- 2:b615682e3e4f
- Child:
- 6:a61b01442f37
diff -r bcef9164776e -r 11489c0bd020 main.cpp
--- a/main.cpp Tue Apr 03 20:00:23 2018 +0000
+++ b/main.cpp Thu Apr 05 15:54:48 2018 +0000
@@ -1,8 +1,27 @@
-#include "SPI.h"
+#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();
