Herunterladen Inhalt Inhalt Diese Seite drucken

SunFounder Da Vinci Kit Bedienungsanleitung Seite 442

Für den raspberry pi 4 modell b, 3 modell a +, 3 modell b +, 3 modell b, 2 modell b, 1 modell b +, 1 modell a +, zero w and zero
Inhaltsverzeichnis

Werbung

SunFounder Da Vinci Kit
int dragPoint(float
if(mx>=slotPointAX
value
=
int(map(mx,slotPointAX,slotPointBX,minRange,maxRange));
linePoint
=
}
return
value;
}
Eine andere Methode show() besteht darin, den Slider anzuzeigen. Gleichzeitig werden der Bereichswert und der
aktuelle Wert an der entsprechenden Stelle angezeigt.
void
show(){
rectMode(CORNERS);
fill(200);
stroke(255,0,0);
rect(slotPointAX, slotPointAY, slotPointBX, slotPointBY);
fill(255,0,0);
rect(slotPointAX, slotPointAY, linePoint, slotPointBY);
fill(200);
textSize(depth);
text(minRange, slotPointAX, slotPointBY+depth);
text(maxRange, slotPointBX, slotPointBY+depth);
text(value, linePoint, slotPointAY);
}
Weitere Informationen finden Sie unter Verarbeitungsreferenz.
Anzahl anzeigen
In dieser Lektion verwenden wir die Verarbeitung, um eine 7-Segment-Anzeige anzusteuern, um eine Zahl von 0 bis
9 und A bis F anzuzeigen.
Verdrahtung
Skizzieren
438
mx,
float
my){
&&
mx<=slotPointBX
map(value,minRange,maxRange,slotPointAX,slotPointBX);
&&
my>=slotPointAY
Kapitel 1. Über das Da Vinci Kit
&&
my<=slotPointBY){

Werbung

Inhaltsverzeichnis
loading

Verwandte Produkte für SunFounder Da Vinci Kit

Diese Anleitung auch für:

Davinci-kit-for-raspberry-pi

Inhaltsverzeichnis