facebook.png

ETC

ftcommunity.png

© Želimir Bistrović 2019

PROGRAMMING SCHOOL

Raspberry Pi-F5 / T5

ENCODER MOTOR - HALF STEP - BETTER PRECISION

VJ: 024

Pi_spoj_24.jpgPi_024.jpg
DESCRIPTION:
We count the state changes (values 1 and 0). This method is better accurate than the previous one (STEP). The number of impulses we will count depends on the program itself. If the program only controls the engine, or still performs other operations. In the second case, especially at higher engine speed, the program will not be able to read all pulses.
DOWNLOAD:Pi_024.zip

ENCODER MOTOR - STEP - LESS PRECISE

VJ: 023

Pi_spoj_23.jpgPi_023.jpg
DESCRIPTION:
We only count impulses (value 1). To avoid multiple sensor readings, we use the change indicator (ids). This method is less precise. The number of impulses we will count depends on the program itself. If the program only controls the engine, or still performs other operations. In the second case, especially at higher engine speed, the program will not be able to read all pulses.
DOWNLOAD:Pi_023.zip

SERVO MOTOR

VJ: 020

Pi_spoj_20.jpgPi_020.jpg
DESCRIPTION:
Example of operating the first servo motor. In the software example you can also see the code for controlling another servo motor.
DOWNLOAD:Pi_020.zip

ULTRASOUND SENSOR (ANALOGUE)

VJ: 019

Pi_spoj_19.jpgPi_019.jpg
DESCRIPTION:
Using the ultrasonic sensor, we can measure the distance to the object in front of the sensor. Depending on the sensor, larger or smaller maximum distances can be read. The LED illuminates less when the distance from the sensor to the subject is smaller and vice versa.
DOWNLOAD:Pi_019.zip

ULTRASOUND SENSOR (DIGITAL)

VJ: 018

Pi_spoj_18.jpgPi_018.jpg
DESCRIPTION:
With the help of an ultrasonic sensor we can detect an object when it is at a distance less than the one set in the program (the LED lights up). If the object is at a greater distance, the program will not register it.
DOWNLOAD:Pi_018.zip

COLOR SENSOR - BLACK LINE

VJ: 017

Pi_spoj_17.jpgPi_017.jpg
DESCRIPTION:
The readings for white and black are usually different enough, so that with the help of two color sensors we can make robot car that follows the black line.
DOWNLOAD:Pi_017.zip

COLOR SENSOR - COLORS

VJ: 016

Pi_spoj_16.jpgPi_016.jpg
DESCRIPTION:
The color sensor reads colors as values (analog). According to the apparent color value, a certain color of the LED lights up. The readings are VERY dependent on the conditions (illumination) and may vary even though the color patterns are the same
DOWNLOAD:Pi_016.zip

MAGNETIC SENSOR (DIGITAL)

VJ: 015

Pi_spoj_15.jpgPi_015.jpg
DESCRIPTION:
A magnetic sensor detects a magnetic field. By approaching the sensor to a magnetic field (permanent or electromagnet), the LED lights up.
DOWNLOAD:Pi_015.zip

HEAT SENSOR (ANALOGUE)

VJ: 013

Pi_spoj_13.jpgPi_013.jpg
DESCRIPTION:
By heating the thermal sensor to a certain temperature, the LED lights up. We heat the thermal sensor with light bulb.
DOWNLOAD:Pi_013.zip

IR SENSOR (ANALOGUE)

VJ: 012

Pi_spoj_12.jpgPi_012.jpg
DESCRIPTION:
By analogous reading of the IR sensor, a white surface can be detected at a distance of several centimeters.
DOWNLOAD:Pi_012.zip

IR SENSOR (DIGITAL)

VJ: 011

Pi_spoj_11.jpgPi_011.jpg
DESCRIPTION:
Depending on the IR sensor readout, the LEDs light up. The white surface gives the reading 1 and the black (line) 0.
DOWNLOAD:Pi_011.zip

DC MOTOR - SPEED CONTROL (ANALOGUE)

VJ: 010

Pi_spoj_10.jpgPi_010.jpg
DESCRIPTION:
Program, changes the rotation speed of the DC motor. Lower rotation speed, usually means lower engine power.
DOWNLOAD:Pi_010.zip

DC MOTOR - TWO WAYS ROTATION (DIGITAL)

VJ: 009

Pi_spoj_09.jpgPi_009.jpg
DESCRIPTION:
Pressing the switch A and B, alternates the direction of rotation of the DC motor (both directions).
DOWNLOAD:Pi_009.zip

DC MOTOR - ONE WAY ROTATION (DIGITAL)

VJ: 008

Pi_spoj_08.jpgPi_008.jpg
DESCRIPTION:
By pressing switch, the DC motor starts to rotate in one direction.
DOWNLOAD:Pi_008.zip

DC MOTOR (DIGITAL)

VJ: 007

Pi_spoj_07.jpgPi_007.jpg
DESCRIPTION:
The DC motor starts rotating in one direction for 100 ms. It stops for 2 seconds and then repeats the action.
DOWNLOAD:Pi_007.zip

PHOTO SENSOR - LED LIGHT (ANALOGUE)

VJ: 006

Pi_spoj_06.jpgPi_006.jpg
DESCRIPTION:
The LEDs light up depending on the value read by the PHOTO sensor.
DOWNLOAD:Pi_006.zip

PHOTO SENSOR - LED LIGHT (DIGITAL)

VJ: 005

Pi_spoj_05.jpgPi_005.jpg
DESCRIPTION:
The LEDs light up when the PHOTO sensor is sufficiently illuminated.
DOWNLOAD:Pi_005.zip

LED LIGHT - MICRO SWITHCH (ANALOGUE)

VJ: 004

Pi_spoj_04.jpgPi_004.jpg
DESCRIPTION:
By pressing the button, the bright LEDs light up.
DOWNLOAD:Pi_004.zip

LED LIGHT (ANALOGUE)

VJ: 003

Pi_spoj_03.jpgPi_003.jpg
DESCRIPTION:
The program slowly increases the brightness of the LED.
DOWNLOAD:Pi_003.zip

LED LIGHT - MICRO SWITCH (DIGITAL)

VJ: 002

Pi_spoj_02.jpgPi_002.jpg
DESCRIPTION:
Pressing the switch, the LED lights up.
DOWNLOAD:Pi_002.zip

LED LIGHT (DIGITALY)

VJ: 001

Pi_spoj_01.jpgPi_001.jpg
DESCRIPTION:
The LED lights up and goes out at half-second intervals.
DOWNLOAD:Pi_001.zip