Herunterladen Inhalt Inhalt Diese Seite drucken

SunFounder Da Vinci Kit Bedienungsanleitung Seite 447

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

setup() {
void
size(400, 200);
frameRate(50);
mySlider
=
new
levelRange,number);
GPIO.pinMode(SDI, GPIO.OUTPUT);
GPIO.pinMode(RCLK, GPIO.OUTPUT);
GPIO.pinMode(SRCLK, GPIO.OUTPUT);
GPIO.digitalWrite(SDI, 0);
GPIO.digitalWrite(RCLK, 0);
GPIO.digitalWrite(SRCLK, 0);
}
void
draw() {
background(255);
mySlider.show();
hc595_shift(SegCode[number]);
}
void
mouseDragged(){
number
=
mySlider.dragPoint(mouseX,mouseY);
}
class
Slider{
float
slotPointAX;
float
slotPointBX;
float
slotPointAY;
float
slotPointBY;
float
linePoint;
float
depth;
int
maxRange;
int
minRange;
int
value;
Slider(float
ax,
slotPointAX
slotPointAY
slotPointBX
slotPointBY
maxRange
=
minRange
=
value
=
v;
linePoint
=
slotPointBX);
depth
=
(slotPointBY
}
void
show(){
rectMode(CORNERS);
fill(200);
stroke(255,0,0);
rect(slotPointAX, slotPointAY, slotPointBX, slotPointBY);
fill(255,0,0);
1.11. Spielen Sie mit der Verarbeitung
Slider(width
0.2,height
*
float
ay,
float
bx,
=
ax;
=
ay;
=
bx;
=
by;
max;
min;
slotPointAX;// + map(value, minRange, maxRange, slotPointAX,
-
slotPointAY)
0.4,width
0.8,height
*
*
float
by,
int
min,
0.75;
*
SunFounder Da Vinci Kit
(Fortsetzung der vorherigen Seite)
0.6,0,
*
int
max,
int
v){
(Fortsetzung auf der nächsten Seite)
443

Werbung

Inhaltsverzeichnis
loading

Verwandte Produkte für SunFounder Da Vinci Kit

Diese Anleitung auch für:

Davinci-kit-for-raspberry-pi

Inhaltsverzeichnis