F5OJ5


LESSON 1: Using Python With Arduino
July 18, 2014

  http://www.toptechboy.com/arduino/lesson-1-using-python-with-arduino/

Today we are going to start a new series of lessons that will allow you to take your Arduino projects up to the next level. Hopefully you have been through my 20 lessons on using the Arduino. If you are not familiar with the Arduino, you should start with those lessons. If you are familiar with Arduino, you can just right into this series of Lessons.

  https://www.youtube.com/watch?v=95w4sx_zoB8

One of the major limitations of the Arduino IDE is its limited ability to interact with the user.  You can print text to a simple serial monitor text box, or get text input from the user. You can open up a new world of possibilities by using the programming language python to interact with the Arduino. Python combined with Arduino is a powerful combination what will drastically increase the WOW factor of your projects.

The video above will show a cool project that will hopefully motivate you to undertake this series of lessons. Python is a really cool language, and now that you know Arduino, it will be a breeze to learn Python!


Python with Arduino LESSON 2: Installing the Software
July 18, 2014

  http://www.toptechboy.com/arduino
       /python-with-arduino-lesson-2-installing-the-software/

There are some really incredible things we can do when we get our little Arduino to talk to the big bad Python programming language. To do that, we have to start by downloading some software. Never fear.. it is all free and I will take you step by step through the installation. The video above shows you how to do it.

  https://www.youtube.com/watch?v=mF5cE3DS50s

If you are the impatient and technically adept type, you can download these three software packages:

1) Download and Install Python 2.7.8. Please note all my tutorials use this flavor of python. If you want to follow my tutorials, do not download a Python 3.x. Also download 32 bit version of the software, even if you have a 64 bit windows machine.

2) Download and Install Pyserial version 2.7. Again, download the 32 bit version of the software.

3) Download and install the Vpython library for 32 bit windows.

Now, lets get python and arduino talking together. First up, we need a simple program to get the Arduino sending data over the serial port. The following program is a simple program that will have the Arduino count and send the data to the serial port.

  int cnt=0;
  void setup() {
    Serial.begin(9600);
  }

  void loop() {
    Serial.print("I am Counting to: ");
    Serial.print(cnt);
    Serial.println(" Mississippi.");
    cnt=cnt+1;
    delay(1000);
  }

Now, open the VIDLE environment which you downloaded with the Vpython library. Once you have done that, you are ready to write a Python Program that will go out and read the data over the serial port. Full explanation is in the video. Do note, however, that the line:

  arduinoSerialData = serial.Serial('com11',9600)

This is for a windows machine. Also, the 'com11' has to be adjusted and set to whatever com port your arduino is talking on. You can figure that out by looking at Tools -- Port on the Arduino. Set this parameter to whatever port your Arduino is talking on. Then, the baud rate needs to match as well. You can use whatever you want by Arduino and Python need to be on the same baud rate, which you set on this line of code. OK, the complete Python code to read the Arduino data from the serial port is here:

  import serial #Import Serial Library

  # Create Serial port object called arduinoSerialData
  arduinoSerialData = serial.Serial('com11',9600)

  while (1==1):
      if (arduinoSerialData.inWaiting()>0):
          myData = arduinoSerialData.readline()
          print myData

Simple as that! Welcome to the world of having the Power of Python now at your fingertips.


Python with Ardiuno LESSON 3: Simple Virtual World Using Ultrasonic Sensor

  http://www.toptechboy.com/arduino/python-with-ardiuno-3-example-using-ultrasonic-sensor/
  https://www.youtube.com/watch?v=jUbTK0BKj50

Python with Arduino LESSON 4: Expanding your Virtual World

  http://www.toptechboy.com/arduino/python-with-arduino-lesson-4-expanding-your-virtual-world/
  https://www.youtube.com/watch?v=rE84gJUZGO8

Python with Arduino LESSON 5: Finishing our Virtual Reality Example

  http://www.toptechboy.com/arduino/python-with-arduino-lesson-5-finishing-our-virtual-reality-example/
  https://www.youtube.com/watch?v=LLfO2UYhXWA

Python with Arduino LESSON 6: Installing PIP on Windows

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-6-installing-pip-on-windows/
  https://www.youtube.com/watch?v=05A8Ukmewv0

Python with Arduino LESSON 7: Installing Matplotlib for Graphing

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-7-installing-matplotlib-for-graphing/
  https://www.youtube.com/watch?v=x6Z38Ywc1qE

Python with Arduino LESSON 8: Introduction to Graphing with Matplotlib

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-8-introduction-to-graphing-with-matplotlib/
  https://www.youtube.com/watch?v=1b3rZ_YOO6M

Python with Arduino LESSON 9: Measuring Pressure and Temperature with the BMP180 Sensor

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-9-measuring-pressure-and-temperature-with-the-bmp180-sensor/
  https://www.youtube.com/watch?v=z9AzZM1-Dns

Python with Arduino LESSON 10: Installing Drawnow to Allow Live Plotting with Matplotlib

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-10-installing-drawnow-to-allow-live-plotting-with-matplotlib/
  https://www.youtube.com/watch?v=__OGCVR1lTQ

Python with Arduino LESSON 11: Plotting and Graphing Live Data from Arduino with Matplotlib

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-11-plotting-and-graphing-live-data-from-arduino-with-matplotlib/
  https://www.youtube.com/watch?v=zH0MGNJbenc

Python with Arduino LESSON 12: Approximating Changes in Height from Changes in Pressure

  http://www.toptechboy.com/arduino-with-python/python-with-arduino-lesson-12-approximating-changes-in-height-from-changes-in-pressure/
  https://www.youtube.com/watch?v=L38vPuYNxas

Python with Arduino LESSON 13: Calculating Height from Pressure measurements from BMP180 Pressure Sensor.

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-13-calculating-height-from-pressure-measurements-from-bmp180-pressure-sensor/
  https://www.youtube.com/watch?v=kjGSCBu5p0g

Arduino LESSON 21: Log Sensor Data to an SD Card

  http://www.toptechboy.com/arduino/arduino-lesson-21-log-sensor-data-to-an-sd-card/
  https://www.youtube.com/watch?v=-nXSUXJz4QQ

LESSON 22: Build an Arduino GPS Tracker

  http://www.toptechboy.com/arduino/lesson-22-build-an-arduino-gps-tracker/
  https://www.youtube.com/watch?v=OsMoowoB2Rg

LESSON 23: Arduino GPS with Data Logger

  http://www.toptechboy.com/arduino/lesson-23-arduino-gps-with-data-logger/
  https://www.youtube.com/watch?v=TdXbP8XhbX8

LESSON 24: Understanding GPS NMEA Sentences

  http://www.toptechboy.com/arduino/lesson-24-understanding-gps-nmea-sentences/
  https://www.youtube.com/watch?v=AXwSYz6htsg

LESSON 25: Display Your GPS Data as Track on Google Earth

  http://www.toptechboy.com/arduino/lesson-25-display-your-gps-data-as-track-on-google-earth/
  https://www.youtube.com/watch?v=-dzfQ9vgYJM

LESSON 26: Wire Wrapping

  http://www.toptechboy.com/arduino/lesson-26-wire-wrapping/
  https://www.youtube.com/watch?v=Sl5acslCLGI

LESSON 27: Instrument Package

  http://www.toptechboy.com/arduino/lesson-27-instrument-package-for-high-altitude-balloon/
  https://www.youtube.com/watch?v=WhjghdZRET0

Python with Arduino Lesson 14: Introduction to Xbee Radios and Wireless Communication

  http://www.toptechboy.com/arduino/python-with-arduino-lesson-14-introduction-to-xbee-radios-and-wireless-communication/
  https://www.youtube.com/watch?v=T-woQfEBzx8

Python with Arduino LESSON 15: Configuring and Using the Xbee Radios

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-15-configuring-and-using-the-xbee-radios/
  https://www.youtube.com/watch?v=7fRAXAqCaRg

Python with Arduino LESSON 16: Simple Client Server Configuration over Ethernet

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-16-simple-client-server-configuration-over-ethernet/
  https://www.youtube.com/watch?v=TWGV47WrKmQ

Python with Arduino LESSON 17: Sending and Receiving Data Over Ethernet

  http://www.toptechboy.com/tutorial/python-with-arduino-lesson-17-sending-and-receiving-data-over-ethernet/
  https://www.youtube.com/watch?v=eoiuhPxCcM4

Raspberry Pi Linux LESSON 1: Introduction to the Pi
May 22, 2015

  http://www.toptechboy.com/raspberry-pi
       /raspberry-pi-linux-lesson-1-introduction-to-the-pi/

  https://www.youtube.com/watch?v=J4fhE4Pp55E

admin
May 24, 2015 at 7:51 pm

Well alright then! Next lesson will be how to install the operating system and get the pi booted up. Then, we will go through lessons on using the command line. We will learn linux via the terminal. Then we will see how we can write python programs in the terminal, and how we can run those programs. Then we will learn out to interact with the input and output pins, like we did in arduino. Only after we have really learned linux and the pi will we fire up the graphical windows interface. At this point hopefully you will have no need or desire to use the graphical interface.

------------------------------------------------------------------------

Older:

LESSON 1: Simple Introduction to the Arduino

  http://www.toptechboy.com/arduino/lesson-1-simple-introduction-to-the-arduino-microcontroller/
  https://www.youtube.com/watch?v=d8_xXNcGYgo

Lesson 2: Using a Breadboard

  http://www.toptechboy.com/arduino/arduino-lesson-2-using-a-breadboard/
  https://www.youtube.com/watch?v=uHUSsSlZa24

Lesson 3: For Loops for Simple LED Circuit

  http://www.toptechboy.com/arduino/arduino-lesson-3-simple-led-circuit/
  https://www.youtube.com/watch?v=O4JACbIQX_w

LESSON 4: Printing Over the Serial Port

  http://www.toptechboy.com/arduino/arduino-lesson-4-printing-over-the-serial-port/
  https://www.youtube.com/watch?v=ysHY5JUkpUQ

Lesson 5: Working With Strings

  http://www.toptechboy.com/arduino/arduino-lesson-5-working-with-strings/
  https://www.youtube.com/watch?v=DwOLDLDqWUk

Lesson 6: Reading From the Serial Port

  http://www.toptechboy.com/arduino/arduino-lesson-6-reading-from-the-serial-port/
  https://www.youtube.com/watch?v=-3Xg8x2ibeY

Lesson 7: Using While Loops

  http://www.toptechboy.com/arduino/arduino-lesson-7-using-while-loops/
  https://www.youtube.com/watch?v=Y64Ev-pWqFs

Lesson 8: Writing Analog Voltages in Arduino

  http://www.toptechboy.com/arduino/lesson-8-writing-analog-voltages-in-arduino/
  https://www.youtube.com/watch?v=9FBMVt-iFrM

LESSON 9: Ohm’s Law and Potentiometers

  http://www.toptechboy.com/arduino/lesson-9-ohms-law/
  https://www.youtube.com/watch?v=J7t338s6l1I

Lesson 10: Analog Reads on the Arduino

  http://www.toptechboy.com/arduino/lesson-10-analog-reads-on-the-arduino/
  https://www.youtube.com/watch?v=QsYcYknKbB0

Lesson 11: Arduino Circuit to Dim LED with Potentiometer

  http://www.toptechboy.com/arduino/lesson-11-arduino-circuit-to-dim-led-with-potentiometer/
  https://www.youtube.com/watch?v=afurKLOqqSg

LESSON 12: Simple and Easy Way to Read Strings, Int’s and float’s Over Arduino Serial Port

  http://www.toptechboy.com/arduino/lesson-12-simple-and-easy-way-to-read-strings-ints-and-floats-over-arduino-serial-port/
  https://www.youtube.com/watch?v=VIa_QZWIonQ

LESSON 13: Controlling RGB LED with Arduino

  http://www.toptechboy.com/arduino/lesson-13-controlling-rgb-led-with-arduino/
  https://www.youtube.com/watch?v=gqAHOoqo3OI

LESSON 14: If Statements and Conditionals in Arduino

  http://www.toptechboy.com/arduino/lesson-14-if-statements-and-conditionals-in-arduino/
  https://www.youtube.com/watch?v=J43xw4WXnx8

LESSON 15: Super Cool Arduino Color Sensor Project

  http://www.toptechboy.com/arduino/lesson-15-super-cool-arduino-color-sensor-project/
  https://www.youtube.com/watch?v=7N2u7VRChzY

LESSON 16: Controlling a Servo with Arduino

  http://www.toptechboy.com/arduino/lesson-16-controlling-a-servo-with-arduino/
  https://www.youtube.com/watch?v=fE4m7TyLd8M

LESSON 17: Measuring the Speed of Sound with Arduino and Ultrasonic Sensor

  http://www.toptechboy.com/arduino/lesson-17-measuring-the-speed-of-sound-with-arduino-and-ultrasonic-sensor/
  https://www.youtube.com/watch?v=eaHRHQ5Ca_U

LESSON 18: Distance Meter Using Ultrasonic Sensor and Arduino

  http://www.toptechboy.com/arduino/lesson-18-distance-meter-using-ultrasonic-sensor-and-arduino/
  https://www.youtube.com/watch?v=rTM5gZxBPmY

LESSON 19: Arduino LCD Display
July 17, 2014

  http://www.toptechboy.com/arduino/lesson-19-arduino-lcd-display/
  https://www.youtube.com/watch?v=3mJaXybTmTk

LESSON 20: Arduino LCD Project for Measuring Distance with Ultrasonic Sensor
July 17, 2014

  http://www.toptechboy.com/arduino/lesson-20-arduino-lcd-project-for-measuring-distance-with-ultrasonic-sensor/
  https://www.youtube.com/watch?v=AzS_0aXDlW4