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: ConfigFile PID PPM MODSERIAL mbed-rtos mbed MaxbotixDriver TinyGPS filter
statusLights.h
00001 #include "mbed.h" 00002 #include "rtos.h" 00003 #include "hardware.h" 00004 00005 // The status thread indicates the current system status to the user 00006 void StatusThread(void const *args) 00007 { 00008 printf("Status lights thread started\r\n"); 00009 00010 int ledState = 0; 00011 while (true) 00012 { 00013 ledState++; 00014 if (ledState > 5) { ledState = 0; } 00015 00016 _led1 = (ledState == 0); 00017 _led2 = (ledState == 1 || ledState == 5); 00018 _led3 = (ledState == 2 || ledState == 4); 00019 _led4 = (ledState == 3); 00020 00021 Thread::wait(100); 00022 } 00023 }
Generated on Wed Jul 13 2022 14:05:54 by
1.7.2