INF2004-Project v0.1
 
Loading...
Searching...
No Matches
main.c File Reference

Demonstration for the Ultrasonic driver. More...

#include <stdio.h>
#include <stdint.h>
#include "pico/stdio.h"
#include "pico/time.h"
#include "ultrasonic/ultrasonic.h"
Include dependency graph for main.c:

Macros

#define ECHO_PIN   1
 Echo pin for the ultrasonic sensor.
 
#define SLEEP_1S   1000
 
#define TRIG_PIN   0
 Trigger pin for the ultrasonic sensor.
 

Functions

int main (void)
 Main function for the ultrasonic demo. More...
 

Detailed Description

Demonstration for the Ultrasonic driver.

Author
Ang Jia Yu
Version
0.1
Date
2023-10-24

Function Documentation

◆ main()

int main ( void  )

Main function for the ultrasonic demo.

Returns
int 0 if successful.

References ECHO_PIN, SLEEP_1S, TRIG_PIN, ultrasonic_get_cm(), ultrasonic_get_in(), and ultrasonic_init_pins().

Here is the call graph for this function: