How to connect Arduino and Python

How to connect Arduino and Python

Example, how to send a message from Arduino to a Python-program Arduino code: void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 bps } void loop() { Serial.println("Hello, it'a Ardunio!"); //send message delay(5000); } In Python we use pyserial library In the examples in this librar...

Read More →

Introduction in the gradient descent

Introduction in the gradient descent

A bit of theory: Suppose we just need to find a minimum of the one-dimensional function. As early as the 17th century Pierre de Fermat was invented a criterion that allowed solving simple optimization problems, namely, if x* is a minimum point of f*, then: This criterion is based on a linear approximation The closer x to ...

Read More →

Save the video stream from your camera using OpenCV

Save the video stream from your camera using OpenCV

OpenŠ”V offers great opportunities when working with video and images. For example, saving streaming video from a video camera in real time. All examples were written for OpenCV version 3.4.2 Example on python3.6.5: import cv2 # function video capture cameraCapture = cv2.VideoCapture(0) # rame rate or frames per second fps = 30 ...

Read More →

Search
Popular Posts
Subscribe
{{post}}