Tag Archives: Arduino

Arduino Uno R4 WiFi LESSON 36: Finding Average of an Array of Numbers on Arduino


 

Below is the code we develop in the video above. It inputs an array of grades, it averages the grades, and then finds the High and Low Grades.

 

Using the Arduino Uno R4 Wifi to Measure Temperature and Humidity With the DHT11

In this video lesson we show you how to measure temperature and humidity using the DHT11 sensor. For your convenience, we include the code below which we develop in the above video. Enjoy!

 

Using an Arduino with Python LESSON 14: Model a Moving Marble in a Room Using Parameters


In this lesson we show how to model a moving marble in vPython. We show how to create an animation where the marble bounces off the left and righty walls of our virtual room. For your convenience, we include the code below:

 

Using an Arduino with Python LESSON 5: Analog Voltage Meter in vPython

In this lesson we begin coding a 3D analog voltmeter model in vPython. We begin by connecting a potentiometer to an arduino to create a voltage divider. The voltage is read from the center tap of the potentiometer by the arduino, and then the arduino passes the data to python. Then, we animate the  analog voltmeter based on the readings passed from the Arduino. Enjoy!

Then this is the code we developed for the Python side.

 

 

Using an Arduino with Python LESSON 4: Visual Display of Measured Voltage in Visual Python

In this lesson we show how you can measure a voltage from a potentiometer using Arduino, and then pass that data to Visual Python over the serial port. Then we use visual python to create a 3D model that is animated by the live data.

On the Arduino side we use the following code to measure the voltage from the potentiometer:

Then on the python side we read and display the data with the following code:

Watch the video for a complete explanation of the code.