For example, the first time the author writes about how to start badly, first explain what to say, go to a very low school in a Taoist shrine, and contact the Raspberry Pi is based on professional, computer science and technology embedded direction, but I belong to halfway (technical slag)) The Raspberry Pi 3 just came out when the aunt pushed it was quite watery, and persevering Taobao was able to book at the time but the price was a little expensive, waiting for a period of time domestic listing decisive start one, the price is now compared to It's expensive, but it's easy to think about buying early and enjoying it early.
Purchase link
In fact, you only need Raspberry Pi + DuPont + Sensor.
First look at my Raspberry Pi
The red is the T-type GPIO expansion board gray is 40Pin flat cable GPIO connection line The right is the temperature sensor ds18b20 (this is the sensor module connected pull-up resistor is recommended to use this)
There was a thermal power plant next to the place where I lived. A few days ago I saw that the electrostatic adsorption function was too strong to find a box and made a "shell." Also opened the cooling holes and interface holes.
Ok, step into the topic
-------------------------------------------------- -----------------------------------------
As for the basic operations of the Raspberry Pi, I have never written about the basic operations before.
To quote the wiring diagrams on the Internet, it is simpler than a scoop on the gourd. Since everything is a Linux file, ds18b20 is also displayed as a file on the Raspberry Pi. We only need to read this file.
Sudo modprobe w1-gpio
Sudo modprobe w1-therm
Cd /sys/bus/w1/devices/
Ls
Cd 28-0216001e23ff
Cat w1_slave
Note here that the name of your sensor 28-0216001e23ff, everyone will not be the same, the temperature is equal to t/1000 = 30.062 degrees, this time you can use Python or c to write a small program to automatically convert the temperature output, but We need to do temperature monitoring. I'm using yelink. Yeelink is a well-known free internet of things data platform in China. We need to apply for a yeelink account and add devices and sensors. The process is as follows: First, register an account number to enter the user center and click Add. The new device, after creating a new device, select the one on the right side of the device you created and select Add Sensor to add a temperature sensor to your device.
Next we have to write a program to convert the data we read into a temperature and save it in txt text without uploading it to the yelink platform.
Sudo vi /home/pi/py/shinei-wendu.py
code show as below:
The temperature is uploaded to the yelink platform through the script to achieve the following script
Sudo vi /home/pi/py/shinei-wendu-shangchuan.sh
!/bin/bash
Sudo python /home/pi/py/shinei-wendu.py
Curl --request POST --data-binary @"/home/pi/py/shinei-wendu.txt" --header "U-ApiKey:2d223e031d7f9d141996d0b9fb4f3b3c" http://api.yeelink.net/v1.1/device /349611/sensor/391748/datapoints
Here shinei-wendu.txt is the converted temperature of shinei-wendu.py.
Replace U-ApiKey:XXXXXXXXXXXXXXXX with your own account's API Key.
The following URL also needs to be replaced with the sensor URL you applied for.
The red rectangles in the figure are respectively U-ApiKey and url
We also need to add a boot to our temperature upload script: sudo chmod a+x /home/pi/py/shinei-wendu-shangchuan.sh //Give the script executable permissions
Then use the crontab schedule task to execute the upload script
/2 /home/pi/py/shinei-wendu-shangchuan.sh //Execute once in two minutes
Of course, you can also start the boot by modifying /etc/rc.local. This kind of trouble point is not described.
This is my sensor address. The first is the temperature of the cpu, and the second is the room temperature so that the room temperature can be known anywhere by accessing the sensor address.
The technology is not fine. If you have any mistakes, welcome to the valued friends. Next, write a simple video surveillance. Do you have a good friend on the intranet mapping?
The latest Windows has multiple versions, including Basic, Home, and Ultimate. Windows has developed from a simple GUI to a typical operating system with its own file format and drivers, and has actually become the most user-friendly operating system. Windows has added the Multiple Desktops feature. This function allows users to use multiple desktop environments under the same operating system, that is, users can switch between different desktop environments according to their needs. It can be said that on the tablet platform, the Windows operating system has a good foundation.
Windows Tablet,New Windows Tablet,Tablet Windows
Jingjiang Gisen Technology Co.,Ltd , https://www.jsgisengroup.com