Bonus EV3 Programming Lessons LEGO MINDSTORMS EV3Dev and Raspberry Pi Communicator.

Slides:



Advertisements
Similar presentations
Squaring or Aligning on a Line
Advertisements

BEGINNER EV3 PROGRAMMING Lesson
By Droids Robotics Good Coding Practices: Start with Pseudocode BEGINNER EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 4/1/
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
By Lego Works NXT Light Sensors on the EV3 ADVANCED EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 1/29/
BEGINNER EV3 PROGRAMMING Lesson
Parallel Beams INTERMEDIATE EV3 PROGRAMMING LESSON By Droids Robotics
Parallel Beam Synchronization
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Display Block.
By Droids Robotics Infrared Sensor Intermediate EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 5/26/
Embedded Programming and Robotics Lesson 12 Introducing the Raspberry Pi Intro to Raspberry Pi1.
Menu System ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics Turn Degrees My Block.
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics Debugging Techniques.
By Mesa Robles Robotworks and Droids Robotics
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics Color Line Follower My Blocks with Inputs: Move Until Black © 2014, Droids Robotics, v. 2.0, Last edit.
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics My Blocks Overview Step-by-Step Visual Guide to Creating a My Block with Inputs with Outputs.
ADVANCED EV3 PROGRAMMING LESSON
Gyro Turns ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Switches.
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics Move Distance My Block (Move_Inches)
Calibrating Color Sensors
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: EV3 Basics Introduction to the EV3 Brick and Software.
BEGINNER EV3 PROGRAMMING Lesson
By Droids Robotics Line Followers: Basic to Proportional ADVANCED EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 4/5/
 By Droids Robotics Code Contributed by FLL 1920 Line Following with Two Color Sensors and Proportional Control ADVANCED EV3 PROGRAMMING LESSON © 2015.
ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics 1 Data Logging (Part 2)
Data Logging (Part 1).
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON MOVE DISTANCE MY BLOCK (MOVE_CM)
BEGINNER EV3 PROGRAMMING Lesson
By Droids Robotics INTERMEDIATE EV3 PROGRAMMING LESSON SIMPLE & OPTIMIZED ULTRASONIC WALL FOLLOW.
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Using Sensor Data and Port View.
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON DATA WIRES.
By Droids Robotics INTERMEDIATE PROGRAMMING LESSON BRICK BUTTONS AS SENSORS.
Bonus EV3 Programming Lessons By Droids Robotics LEGO MINDSTORMS and Raspberry Pi Communicator.
Bonus EV3 Programming Lessons By Droids Robotics PixyCam for MINDSTORMS Color Identifinder.
PixyCam for MINDSTORMS Introduction
ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics PROPORTIONAL ULTRASONIC WALL FOLLOWER © 2015, EV3Lessons.com, Last edit 11/17/2015.
Introduction to ev3dev: Setup
Bonus EV3 Programming Lessons By Droids Robotics LEGO MINDSTORMS and Raspberry Pi IR Light controller.
Bonus EV3 Programming Lessons LEGO MINDSTORMS ev3dev and Raspberry Pi IR Light controller.
Bonus EV3 Programming Lessons By Droids Robotics PixyCam for MINDSTORMS: Color Codes.
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Touch Sensor.
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON COLOR LINE FOLLOWER MY BLOCK WITH INPUTS: MOVE FOR DISTANCE.
TABLET LESSONS INTRODUCTION TO THE EV3 BRICK AND SOFTWARE By Sanjay and Arvind Seshan.
Building a Robot for Our Lessons
INTERMEDIATE PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSON
By Sanjay and Arvind Seshan
Parallel Beam Synchronization
Beginner programming Lesson
Introduction to EV3Dev: Setup with Python
BEGINNER PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSON
Parallel Beam Synchronization
Downloading & Uploading Files
BEGINNER EV3 PROGRAMMING Lesson
LEGO MINDSTORMS and Raspberry Pi Communicator
Repeating Actions (Loops)
BEGINNER PROGRAMMING LESSONS
BEGINNER PROGRAMMING LESSON
Downloading & Uploading Files
BEGINNER PROGRAMMING LESSONS
Menu System.
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
Presentation transcript:

Bonus EV3 Programming Lessons LEGO MINDSTORMS EV3Dev and Raspberry Pi Communicator

Objectives ■Learn how to make send commands from an EV3 to a Raspberry Pi using ev3dev ■Prerequisites: –Must be comfortable using a Raspberry Pi (Unix/Linux commands) and some basic Python –Must be familiar with ev3dev –Complete the EV3Lessons Introduction of ev3dev Lesson © EV3Lessons 2016 (Last Update: 2/6/2016)

Materials ■Raspberry Pi (Tested on Model B Edition 1 using Raspbian) ■EV3 brick ■USB WIFI for EV3 (or another way of connecting to the internet) ■Ethernet/WIFI for Raspberry Pi ■Micro SD card with ev3dev on it (Insert into EV3’s microSD slot) © EV3Lessons 2016 (Last Update: 2/6/2016)

Step 1: Setup ■You will need to be a root/admin user on both devices ■Install software on the Raspberry Pi – sudo raspi-config – Enable SSH  Yes ■Install software on the EV3 (you will need to ssh the EV3) The paramiko software will allow you to use ssh from inside python on the EV3. – sudo apt-get install python-pip – sudo pip install paramiko © EV3Lessons 2016 (Last Update: 2/6/2016)

Step 3: Base Code © EV3Lessons 2016 (Last Update: 2/6/2016) ■The code below is run on the EV3 –This will send a command to the Raspberry Pi –This assumes that you Pi’s full hostname is raspberrypi.home –This assumes that your username is pi and password raspberry ■Replace COMMAND_HERE below with the command you want to execute on the Pi import paramiko #import software client = paramiko.SSHClient() #start ssh client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) #do not give warnings client.connect('raspberrypi.home', username='pi', password='raspberry') #connect to pi stdin, stdout, stderr = client.exec_command(‘COMMAND_HERE') #send a command for line in stdout: #collect command output lines print line.strip('\n') #print output client.close() #disconnect from pi ■CHALLENGE: write a program to list files on the Pi using the EV3

Challenge: Solution © EV3Lessons 2016 (Last Update: 2/6/2016) import paramiko #import software #start ssh client = paramiko.SSHClient() #do not give warnings client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) #connect to pi client.connect('raspberrypi.home', username='pi', password='raspberry') #send a command stdin, stdout, stderr = client.exec_command(‘ls’) for line in stdout: #collect command output lines print line.strip('\n') #print output client.close() #disconnect from pi

CREDITS This tutorial was created by Sanjay Seshan and Arvind Seshan from Droids Robotics. More lessons are available at Author’s Credits: ev3dev.org © EV3Lessons 2016 (Last Update: 2/6/2016) This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License.Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License