Temperaturedefget_cpu_temp (): Cpu_temp_file= Open ("/sys/class/thermal/thermal_zone0/temp") Cpu_temp=Cpu_temp_file.read () cpu_temp_file.close ( )returnFloat (cpu_temp)/1000defMain (): whileTrue:strftime=time.strftime ("%y-%m-%dt%h:%m:%s") Print "Time :", StrftimePrint "cpu_temp:", Get_cpu_temp ()#Sleep 60 secondsTime.sleep (60)if __name__=='__main__': Main ()2nd step: Become the Yeelink platform developer and complete the configuration of the Raspb
git.Cd/home/git
Create a folder for your repository, move it in, initialize and clear the repository.Note that I am currently using a "git" user. This user has control over the/home/git directory.Mkdir test. gitCd test. gitGit -- bare init
Push your code to Pi
In the end, we will push the code to Raspberry Pi. First, change the path to your previously initialize
. truncate (0)Buffer. seek (0)
# Door closed detectedGPIO. wait_for_edge (23, GPIO. FALLING)Print ("Door Closed! \ N ")
# CleanupC. close ()GPIO. cleanup ()
# -------------------- End doorSensor. py --------------------#
Save the Python script on your Raspberry Pi.
Save the Python script to your Raspberry Pi.Run a Python application
To test whether push notificat
another host. It can be used with the default settings by just specifying a hostname (e.g. ping raspberrypi.org ) or an IP address (e.g. ping 8.8.8.8 ). It can specify the number of packets to send with the -c flag.Nmapnmapis a network exploration and scanning tool. It can return port and OS information about a host or a range of hosts. Running just would display the options available as well as nmap example usage.HOSTNAMEThe hostname command display
works.Step 1:
When you are running the command, log on with the default user name and password (if you have not modified it ). The Default User of Raspbian is pi, and the default password is raspberry.Step 2:
After you log on, run the following command:
Sudo raspi-config
This command will open Raspberry Pi configuration, as we saw during the first startup.Ste
How to Use QEMU to simulate Raspberry Pi
The following describes how to use QEMU to simulate Raspberry Pi. After using this method, the system can be tested without a Development Board.
Development Environment
The Host OS environment used for testing is Debian 7.2 Wheezy am
consistent and can be rebuilt (_reproducible_) build environment. Because this has some requirements for CPU and disk space, here are the minimum configuration requirements for some hardware:Raspberry Pi 3 (pi 2 is OK, but the build takes longer)16GB size SD card (8GB is not enough!) )Enable swap space (1GB size of memory is not enough)Docker Engine 1.11
Installing the Build Environment
As you'll soon se
you'll see the whole self contained app, that's ./bin/Debug/netcoreapp2.0/ need to copy to .\bin\Debug\netcoreapp2.0\ your Raspberry Pi.
Getting the app to run on the Pi.linux
Install Linux on your Pi.
Install the platform dependencies from your distro ' s Package manager for. NET Core.
Copy your app, i.e. whole publish directory mentioned
access mysql:
Mysql-u root-p
Then, you will be prompted to enter the password to enter mysql:
Root @ raspberrypi:/home/pi # mysql-u root-pEnter password:Welcome to the MySQL monitor. Commands endYour MySQL connection id is 43Server version: 5.5.35-0 + wheezy1 (Debian)
Copyright (c) 2000,201 3, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsAffiliates. Other names may be trademarks of
network is testing, and the password (psk) is testingPassword.
Adding the network details to the rassberry pi (add the network to Raspberry PI)
Use the nano editor to open the wpa-supplicant configuration file:
Sudo nano/etc/wpa_supplicant/wpa_supplicant.conf
Add the following content at the bottom of the file:
Network = {Ssid = "The_ESSID_from_earlier"Psk = "Yo
: a. Modify Makefile CC = arm-linux-gnueabihf-gcc
B. Locate the location with-m64 and delete-m64.
Step 3: make
Step 4: make install
Install NodeJS http://www.linuxidc.com/Linux/2015-01/111714.htm on (Raspberry Pi) Raspberry Pi
Install Weston http://www.linuxidc.com/Linux/2013-06/86685.htm on
running in the background, first use the following command.FgIt will force it to run for the foreground, and then you can use ctrl-c to stop.It has been tested in several aspects.First, close my WiFi access point. This script does not detect network connections and begins to try to force a connection. After several minutes, connect the power supply access point again.In another experiment, I deleted the MAC address from the address list and allowed the MAC address filtering of the Access Point.
Installing ROS Indigo on the Raspberry PiDescription:this instruction covers the installation of ROS Indigo on the original Raspberry Pi with Raspbian.Keywords:raspberry Pi, Setup, IndigoContents1 IntroductionThis tutorial explains how to install ROS Indigo from source on the Raspb
mode; (5) Photo time, set to 1 second; (6) image size, set to 640x480. The script will automatically take 78 photos, each of which will apply different special effect parameters.
To execute this script, you only need to enter the following command line:
$ python name_of_this_script.py
Below are some samples captured.
Small benefits
In addition to using the raspistill command line tool to manipulate the raspicam camera module, there are other methods to use. Picamera is a python library tha
CROSS_COMPILE = arm-linux-gnueabihf-INSTALL_MOD_PATH =/mnt/ext4 modules_install
Copy the kernel and drive to the SD card
# Back up the original kernel firstCp/mnt/fat32/$ KERNEL. img/mnt/fat32/$ KERNEL-backup.imgScripts/mkknlimg arch/arm/boot/zImage mnt/fat32/$ KERNEL. imgCp arch/arm/boot/dts/*. dtb/mnt/fat32/Cp arch/arm/boot/dts/overlays/*. dtb */mnt/fat32/overlays/Cp arch/arm/boot/dts/overlays/README/mnt/fat32/overlays/
Update firmware
Tar xvf firmware-master.tar.gzCd firmware-master# Replaci
resize2fs /dev/mmcblk0p2
This command expands the second partition to the new space.
Check hard disk usage. OK
df -hOperating principle
First, the Linux primary partition and the Swap partition are deleted. The starting position of the re-built primary partition is the same as that of the original primary partition, and then the data of the original primary partition is not changed, but the size of the primary partition is changed.
How to run Ubuntu Snappy Core in
device to the common Nic, and then connect to the Internet through the NIC. That is, the NAT structure mentioned above. Next, we need to configure the NAT address table to open/etc/sysctl.confAdd the following configuration file to the last line of the file:
net.ipv4.ip_forward=1
Then, start NAT in the kernel:
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEsudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPTsudo iptables -A FORWARD -i wlan0 -o eth0
What is Raspberry Pi? You don't know? I went to Baidu, an interesting hardware.
Online shopping of a batch of accessories, finally arrived, 16 gb sd card, Raspberry Pi, Raspberry Pi box, heat sink (2 pieces of pure copper), dubang
What you need to know before installing1. Coolpy is a Nodejs-based IoT platform (official website http://icoolpy.com). Note: The domestic IoT platform has the LEGO network , Yeelink and so on, but only coolpy is open-source. 2. Node. JS is a platform built on the chrome JavaScript runtime to easily build fast, easy-to-scale Web applications Note: Therefore, to run coolpy, you must first install the Nodejs.
Install a lamp environment for Raspberry Pi in the past two days, but there are too many things installed on it, and the default system space is occupied. But the SD card itself is 16 GB. What if I want to extend the Raspberry Pi to a larger space? I can continue to install the software only after the expansion. After
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.