Skip to content

Commit 2c659a2

Browse files
committed
Adding/moving things to meet the Arduino library specification.
1 parent 8d4d5de commit 2c659a2

6 files changed

Lines changed: 44 additions & 2 deletions

File tree

libdevlpr.ino renamed to examples/flex_detection/flex_detection.ino

File renamed without changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include "Devlpr.h"
2+
3+
Devlpr devlpr;
4+
5+
void printEMG(Devlpr *d) {
6+
int result = d->windowPeakToPeakAmplitude();
7+
Serial.print("0 1024 ");
8+
Serial.println(result);
9+
}
10+
11+
void writeFlex(Devlpr *d) {
12+
Serial.println("FLEX");
13+
}
14+
15+
void setup() {
16+
Serial.begin(2000000);
17+
// add our print function to our DEVLPR schedule
18+
// try to run once every 1ms
19+
devlpr.scheduleFunction(printEMG, 1);
20+
//devlpr.setFlexCallback(writeFlex);
21+
}
22+
23+
void loop() {
24+
// let the DEVLPR library do its job
25+
devlpr.tick();
26+
}

library.properties

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name=Libdevlpr
2+
version=0.1.1
3+
author=Finn Kuusisto <finn@getfantm.com>, Ezra Boley <ezra@getfantm.com>
4+
maintainer=Finn Kuusisto <finn@getfantm.com>
5+
sentence=A library that makes using the FANTM DEVLPR shield easier.
6+
paragraph=Provides functions for reading sensor data and attaching callbacks.
7+
category=Sensors
8+
url=http://www.getfantm.com/
9+
architectures=avr
10+
includes=libdevlpr.h
File renamed without changes.

Devlpr.h renamed to src/Devlpr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef Devlpr_h
22
#define Devlpr_h
33

4-
#define LIBDEVLPR_VERSION "0.1.0"
5-
64
#include "Arduino.h"
75

86
class Devlpr

src/libdevlpr.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef libdevlpr_h
2+
#define libdevlpr_h
3+
4+
#define LIBDEVLPR_VERSION "0.1.1"
5+
6+
#include "Devlpr.h"
7+
8+
#endif

0 commit comments

Comments
 (0)