/pi-snap-sensor-driver

pi-snap sensor driver (ultrasonic sensor, LED)

Primary LanguageCGNU General Public License v2.0GPL-2.0

pi-snap-sensor-driver

Introduction

Project for pi-snap sensor driver

Parts list

  • Ultrasonic sensor
  • Red LED
  • Green LED

Kernel directory path

~/linux-rpi

How to use

1. Build

../pi-snap-sensor-driver/driver/

$ make

../pi-snap-sensor-driver/app/

$ make

2. Load device driver

../pi-snap-sensor-driver/driver/

$ insmod sensor_driver.ko
$ sh mknod.sh

3. Modify IP address

../pi-snap-sensor-driver/app/sensor_lib.h

...
#define IP "127.0.0.1"    // Here!
...

4. Run application

Before running an application, you must ensure that the socket server is running!

$ ./sensor_app.out