Category Archives: Arduino with Python

Improved Client Server Framework for Arduino

In this lesson, we show an improved framework for creating a Client/Server connection between your Arduino and your desktop PC over WiFi. This will serve as the basis for our WiFi projects moving forward.  On the arduino side, we have the following code to create the Server:

Remember, you must create a new tab, and include the following as your ‘secrets.h’ file

And then, on the Desktop side, this will be your python ‘Client’ code:

 

Using an Arduino with Python LESSON 15: Model of Bouncing Marble in 3D Room

In this video lesson we model a 3D room, and have a marble bouncing around in the room, off of each of the six walls. Below we include the code we develop in the video above

 

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 11: Controlling an LED from Python

In this video lesson, we show how to control an LED using python. Python sends commands to arduino, which then controls the LED. We also create a vPython visual, where the ‘Virtual’ LED mimics the behavior of the real LED. This a really cool demonstration and hope you enjoy it. I include below the code we develop in the video. On the arduino side we end up with the following:

And on the python side we have:

 

Using an Arduino with Python LESSON 8: Live Thermometer 3D Visual Using DHT11

In this video lesson we connect the Arduino to a DHT11 temperature and humidity sensor. We show how to wire the device up, and then how to code the Arduino. The data is passed from the Arduino to python. We then create a live 3D thermometer model that updates as the temperature changes.

On the arduino side, this is the code which we use:

Then on the python side, we use the following code: