念慈菴

PythonIot-Grove-UNO

 
Overview

For teaching, the goals of the IOT project framework based on Armbian and Python languages
:
1. Log in to the Jupyter service in one step (based on RNDIS driver-free);
2. Learn Python programming and quickly develop Python-based IOT Internet of Things projects;
3. Learn standard Linux operations System;
4. Use Python to call GPIO/Sensor hardware;
5. Built-in Siot LAN MTQQ protocol;
6. Built-in OpecnCV;
Note: OrangePi Zero/NanoPi Neo (based on Allwinner H2+/H3 core) has been verified so far

Get started quickly with PythonIOT

Teaching goals: experience the Linux operating system (terminal command line), learn Python programming (based on Jupyter ), Internet of Things hardware programming ( Siot/MQTT ), network communication principle experiments, OpenCV face recognition, etc.

1. 45- minute quick introduction

Run the first command line command, run the first Python code, run the first hardware project ( one light, one button , OLED display). The entire training is controlled within 30 minutes, leaving 15 minutes for practical operation, exploration and communication. .

1.1 Connect to PC via USB cable and wait for the driver to be automatically installed;

1. Win system usually does not require driver. In some cases, it will be recognized as a COM port, and the driver needs to be updated manually. First download the driver, run the fifth CMD file ( http://www.qudong51.net/qudong/540.html ) as an administrator , and then install the driver on the device. Double-click the COM port recognized by the USB serial port in the manager and select Computer to find and update the driver. (see appendix)

2. For Linux -compatible systems such as Ubuntu , X86 is automatically installed and verified.

3. Install HoRNDIS-9.2.pkg on Mac system , download address https://joshuawise.com/horndis , and pass the test.

1.2 Enter http://pythoniot.local in the browser to enter the jupyter interface, password: 1950

 

Note : The startup is slow for the first time. Just press RESET to restart the system. There is no need to repeat the above process for future uses.

 

1.3 01_Helloworld.ipynb asks where the world is

 

1.4 02_helloLED.ipynb Yideng Master

 

1.5 03_Maths_plot.ipynbI draw, I draw

 

1.6 04_Face DetectionOpenCV

 

1.7 05_camera_detector camera recognition OpenCV

 

1.8 06_oled12864display

 

1.9 Enter the terminal command line and log in via ssh : root ; 1950

 

1.10 Configure Wi-Fi wireless network

root@ist:/# sudo su

root@ist:/# nmtui

1. Edit connection → enable connection

             

1.11 Built-in cases and games (to be improved)

Choose one of the cases below as a guide for getting started.

1. Top 10 Command Line Games For Linux

sudo apt install bastet Tetris

sudo apt-get install nsnake greedy snake

2. Interesting command lines of Linux

    https://zhuanlan.zhihu.com/p/128057151

https://www.cnblogs.com/hgmyz/p/12351022.html

https://blog.csdn.net/sinat_38682860/article/details/103056558

40 Super Fun Linux Command Line Easter Eggs and Games

https://blog.csdn.net/qq_32523587/article/details/84960304

2. Teaching and research activities

 

3. A Case Study in People’s Education Compulsory Course

sudo apt update

sudo apt install python3-pandas python3-sklearn git

pip3 install wordcloud jieba itchat pyfirmata siot

3.1Physique test

 

3.2 Find prime numbers

 

3.3 Water consumption

 

3.4 GDP statistics

 

4. mosquitto Internet of Things

https://www.jianshu.com/p/37f7ee7ead65

An open source message broker software that implements the message push protocol MQTT v3.1 , provides lightweight, supports publishable / subscribeable message push mode, and makes short message communication between devices simple, such as now Low-power sensors are widely used in mobile devices such as mobile phones, embedded computers, and microcontrollers.

4.1Introduce mosquitto warehouse and update

#Note that this step cannot be ignored

sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa

sudo apt-get update

4.2 Execute the following command to install the mosquitto package

sudo apt-get install mosquitto

4.3 Install mosquitto development package

sudo apt-get install mosquitto-dev

4.4 Install mosquitto client

sudo apt-get install mosquitto-clients

4.5 Check whether mosquitto is running correctly

sudo service mosquitto status

status running results:

 

4.6 Local testing

#Open a terminal and execute the following command to subscribe to the topic "mqtt"

mosquitto_sub -h localhost -t "mqtt" -v

 

#Open another terminal and publish messages to the topic "mqtt"

mosquitto_pub -h localhost -t "mqtt" -m "Hello MQTT"

 

#Now you will see the message being displayed on the previous terminal .

4.7 Network Test ( test.mosquitto.org )

#Through the following command, you can schedule all test mqtt information to be released to the official website. Of course, others can also subscribe to the information you publish.

mosquitto_sub -h test.mosquitto.org -t "#" -v

 

#You can also publish your own exclusive information under the official mqtt service

mosquitto_sub -h test.mosquitto.org -t "myxyz123" -v

 

#Subscribe to your own information

mosquitto_pub -h test.mosquitto.org -t "myxyz123" -m "hello mqtt"

test.mosquitto.org supports encrypted and unencrypted MQTT message modes, and also supports using TCP or Websocket as a bearer. Different packet formats can be observed through wireshark packet capture .

 

Attachment: Win driver installation

The usb rndis driver under Win will be recognized as a COM port by default, and the driver needs to be updated manually.

1. First download kindle_rndis.inf_amd64-v1.0.0.1 , http://www.qudong51.net/qudong/540.html ;

2. Then run the fifth cmd file as administrator ;

 

3. Double-click the COM port recognized by the USB serial port in the device manager and search for the driver on the computer, that is, download the unzipped folder;

4. Wait for the installation of the RNDIS driver in the network adapter to be completed.

 

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-21 12:55:39
  • Share a small example of how to get started with MSP430F5529
  • Bornhack Badge
  • Reliability testing of electronic products
  • Application of Modbus Plus Network in Large Kneading Machine Control System
  • Please help analyze the TL431 circuit
  • Make a beautiful e-magazine by yourself

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号