mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
Collision: Added C Src and Example
This module was initially known as GroveCollision. It has been now changed to Collision. C source and examples added. Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
@ -167,7 +167,7 @@ add_example (adxl335)
|
||||
add_example (hmtrp)
|
||||
add_example (nunchuck)
|
||||
add_example (otp538u)
|
||||
add_example (grovecollision)
|
||||
add_example (collision)
|
||||
add_example (groveelectromagnet)
|
||||
add_example (emg)
|
||||
add_example (o2)
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include "grovecollision.hpp"
|
||||
#include "collision.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -41,9 +41,9 @@ int main(int argc, char **argv)
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
//! [Interesting]
|
||||
// The was tested with the Grove Collision Sensor
|
||||
// Instantiate a Grove Collision on digital pin D2
|
||||
upm::GroveCollision* collision = new upm::GroveCollision(2);
|
||||
// The was tested with the Collision Sensor
|
||||
// Instantiate a Collision on digital pin D2
|
||||
upm::Collision* collision = new upm::Collision(2);
|
||||
|
||||
bool collisionState = false;
|
||||
cout << "No collision" << endl;
|
Reference in New Issue
Block a user