APM:Libraries
simple.cpp
Go to the documentation of this file.
1 /*
2  simple hello world sketch
3  Andrew Tridgell September 2011
4 */
5 
6 #include <AP_HAL/AP_HAL.h>
7 
8 void setup();
9 void loop();
10 
12 
13 void setup() {
14  hal.console->printf("hello world\n");
15 }
16 
17 void loop()
18 {
19  hal.scheduler->delay(1000);
20  hal.console->printf("*\n");
21 }
22 
23 AP_HAL_MAIN();
AP_HAL::UARTDriver * console
Definition: HAL.h:110
AP_HAL_MAIN()
virtual void delay(uint16_t ms)=0
virtual void printf(const char *,...) FMT_PRINTF(2
Definition: BetterStream.cpp:5
void setup()
Definition: simple.cpp:13
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
Definition: simple.cpp:11
const HAL & get_HAL()
AP_HAL::Scheduler * scheduler
Definition: HAL.h:114
void loop()
Definition: simple.cpp:17