Skip to content

Commit

Permalink
update libraries R-Z
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Nov 27, 2020
1 parent 9abe150 commit 7286182
Show file tree
Hide file tree
Showing 105 changed files with 3,354 additions and 1,013 deletions.
21 changes: 21 additions & 0 deletions libraries/Radar/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2013-2020 Rob Tillaart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
83 changes: 60 additions & 23 deletions libraries/Radar/examples/radarDemo/radarDemo.ino
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
//
// FILE: radarDemo.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.00
// PURPOSE:
// DATE:
// URL:
//
// Released to the public domain
//
// VERSION: 0.1.1
// PURPOSE: demo of the radar library
// DATE: 29-03-2015
// URL: https://github.com/RobTillaart/RADAR

#include "radar.h"

uint32_t del = 250;
uint32_t del = 150;

RADAR radar(10, 11);

Expand All @@ -22,51 +19,89 @@ void setup()
Serial.println(RADAR_LIB_VERSION);
Serial.println();

test1();
test2();
test3();
test4();
test5();
test6();
test7();

gohome();
Serial.println();
Serial.print(millis());
Serial.println("\tdone...");
}

void loop()
{
}

void test1()
{
Serial.print(millis());
Serial.println("\t1. home position");
radar.setHomePosition(0, 0);
radar.gotoHomePosition();
wait();
}

void test2()
{
Serial.print(millis());
Serial.println("\t2. gotoPan 20");
radar.gotoPan(20);
wait();
Serial.println();
}

void test3()
{
Serial.print(millis());
Serial.println("\t3. gotoTilt 60");
radar.gotoTilt(60);
wait();
Serial.println();
}

void test4()
{
Serial.print(millis());
Serial.println("\t4. gotoPanTilt 60 20");
radar.gotoPanTilt(60, 20);
wait();
Serial.println();
}

void test5()
{
Serial.print(millis());
Serial.println("\t5. home position");
radar.gotoHomePosition();
wait();
Serial.println();
}

void test6()
{
Serial.print(millis());
Serial.println("\t6. setPosition");
for (int i = 0; i < 10; i++)
{
radar.setPosition(i, random(90), random(90));
}
Serial.println();
}

void test7()
{
Serial.print(millis());
Serial.println("\t7. gotoPosition");
for (int i = 0; i < 10; i++)
{
radar.gotoPosition(i);
int p, t;
radar.getPosition(i, &p, &t);
int16_t p, t;
radar.getPosition(i, p, t);
Serial.print(millis());
Serial.print("\t");
Serial.print(i);
Expand All @@ -78,32 +113,34 @@ void setup()
wait();
Serial.println();
}
}

void gohome()
{
Serial.print(millis());
Serial.println("\t8. home position");
Serial.println("\tgo home position");
radar.gotoHomePosition();
wait();
Serial.println();

Serial.println();
Serial.print(millis());
Serial.println("\tdone...");
}

void loop()
{
}

void wait()
{
Serial.println("\nTIME\t\tPAN\tTILT");
do
{
int p = radar.getPan();
int t = radar.getTilt();
Serial.print(millis());
Serial.print("\t*\t");
Serial.print(p);
Serial.print(radar.getPan());
Serial.print("\t");
Serial.println(t);
Serial.println(radar.getTilt());
delay(del);
} while (radar.isMoving());
Serial.print(millis());
Serial.print("\t*\t");
Serial.print(radar.getPan());
Serial.print("\t");
Serial.println(radar.getTilt());
}

// -- END OF FILE --
15 changes: 6 additions & 9 deletions libraries/Radar/library.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Radar",
"keywords": "Pan,tilt,radar",
"description": "Experimental library for a pan tilt radar.",
"name": "RADAR",
"keywords": "Pan,tilt,radar,ping",
"description": "Arduino library for a pan tilt radar. Experimental",
"authors":
[
{
Expand All @@ -13,12 +13,9 @@
"repository":
{
"type": "git",
"url": "https://github.com/RobTillaart/Arduino.git"
"url": "https://github.com/RobTillaart/RADAR"
},
"version":"0.1.1",
"version":"0.1.3",
"frameworks": "arduino",
"platforms": "*",
"export": {
"include": "libraries/Radar"
}
"platforms": "*"
}
16 changes: 9 additions & 7 deletions libraries/Radar/library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name=Radar
version=0.1.1
name=RADAR
version=0.1.3
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=Experimental library for a pan tilt radar.
paragraph=
category=Device
url=https://github.com/RobTillaart/Arduino/tree/master/libraries/
architectures=*
sentence=Arduino library for a pan tilt radar.
paragraph=Experimental
category=Uncategorized
url=https://github.com/RobTillaart/RADAR
architectures=*
includes=radar.h
depends=
Loading

0 comments on commit 7286182

Please sign in to comment.