Jack Hansdampf / MotorinoLib

Dependents:   Motorino_Lib xxx_Motorino_Lib

Embed: (wiki syntax)

« Back to documentation index

Kanal Class Reference

Kanal Class Reference

Verwendet Motorino,h mbed Library to use a Motorino shield from Joy IT Copyright (c) 2021 Jörg Sturm Released under the MIT License: http://mbed.org/license/mit. More...

#include <Kanal.h>

Public Member Functions

 Kanal (int nr)
 Create Kanal Instance.
void go (float w, int zeit)
 Drehe den Servo um Winkel.
bool isBusy ()
 Abfrage, ob die Bewegung läuft.
void setStartEnd (float pStart, float pEnd)
 Setzt Tastgrad für 0 und 180°

Detailed Description

Verwendet Motorino,h mbed Library to use a Motorino shield from Joy IT Copyright (c) 2021 Jörg Sturm Released under the MIT License: http://mbed.org/license/mit.

Example:

 #include "Kanal.h"

 Kanal achse(0);  //PWM-Kanal 0 wird für den Servo benutzt
 int main() {  
     while(1)  {
        achse.go(180,1000); //180° in 1000ms
        while (achse.isBusy(); //warte solange beschäftigt
     }
 }

Definition at line 21 of file Kanal.h.


Constructor & Destructor Documentation

Kanal ( int  nr )

Create Kanal Instance.

Parameters:
nr0..15 Kanalnummer

Definition at line 3 of file Kanal.cpp.


Member Function Documentation

void go ( float  w,
int  zeit 
)

Drehe den Servo um Winkel.

Parameters:
w,:Winkel 0.. 180°
zeit,:Zeit für die Bewegung in ms

Definition at line 37 of file Kanal.cpp.

bool isBusy (  )

Abfrage, ob die Bewegung läuft.

Definition at line 56 of file Kanal.cpp.

void setStartEnd ( float  pStart,
float  pEnd 
)

Setzt Tastgrad für 0 und 180°

Parameters:
pStart,:Tastgrad für 0° default. 5 für 5%
pEnd,:Tastgrad für 180° default. 10 für 10%

Definition at line 62 of file Kanal.cpp.