Python implements the example code of Raspberry Pi WiFi disconnection automatic reconnection, pythonwifi
Enable Automatic reconnection of Wi-Fi disconnection. The principle is to use Python to monitor whether the network is disconnected. If the network is disconnected, restart the network service.
1. Put the Python code autowifi. py in the/home/pi directory:
#
First, operate on the MAC. Generate keyssh-keygen -t rsaThe carriage return uses the default to be good. add key to Ssh-agent$ eval "$(ssh-agent -s)"The PID is printed to indicate that the ssh-agent status is normal and proceed to the next step.ssh-add ~/.ssh/id_rsa Add a public key to the Raspberry PiCheck the local key:ls -al ~/.sshCopy the id_rsa.pub to pi, th
Reference: http://programmingadvent.blogspot.hk/2012/12/raspberry-pi-uart-with-pyserial.htmlRaspberry Pi UART with pyserial os:occidentalis v0.2Hardware:raspberry Pi Revision B with CobblerSetup:serial Loopback (Connect RX and TX pins on GPIO pins)Linux attempts to treat all devices as file system like devices, the UAR
Installation Summary steps: Official website Download system-"brush into TF card-" Set on display and ssh-"Power on-" Enter the system1. Go to the official website to download the system imageDownload page: https://www.raspberrypi.org/downloads/Come to the following pageInstallation under 2.Windows System: (Non-wind system please look down)
2.1) First connect the Ready TF card to the card reader, insert the computer 2.2) download a format SD card tool, format SD cardDownload URL: https://w
Ubuntu Raspberry Pi 2b cross compiling environment, ubuntu2b
Generate executable code on another platform. Why is cross-compilation costly? One sentence: The last thing is. Sometimes it is because the target platform does not allow or cannot install the required compiler, and some features of the compiler are required. Sometimes it is because the resources on the target platform are poor, it is impossible t
The first thing to note is that the Raspberry Pi Debian system is automatically scanning the display, in most cases cannot be displayed in full screen, that is, the actual display of the desktop is larger than the display resulting in some windows can not be displayed or closed, Either the actual displayed effect is less than the size of the display, resulting in black border areas around it. If this is the
Prepare the hard driveAccording to the online introduction that if it is FAT or NTFS format may appear permissions problems, and then simply formatted as EXT4 format.Working with the Minitool Partition WizardWith a small USB flash drive, you can format the Raspberry Pi directly, the command is:mkfs-t EXT4/DEV/SDB1Installing SambaSet the shared folder to/samba$ Mkdir/sambaSet access Permissions$ chmod 777/sa
# Modify the configuration file
Raspberry Pi has integrated the I2C driver and only needs to be started.
Modify configuration file
Sudo nano/etc/modprobe. d/raspi-blacklist.conf
! [Configure] (http://images.cnblogs.com/cnblogs_com/hangxin1940/466697/o_rasp_i2c1.png "comment the third line ")Comment out the third line, CTRL + x save
Next, start the I2C module.
Sudo nano/etc/modules
! [Configure] (ht
Raspberry Pi advanced GPIO library, wiringpi2 for python using notes (4) practice DHT11 decoding, gpiodht11
DHT11 is a temperature and humidity sensor with calibrated digital signal output. Precision humidity +-5% RH, temperature +-2 ℃, range humidity 20-90% RH, temperature 0 ~ 50 deg C.
The encapsulated modules I bought contain the pull-up resistor. After checking the
package for the release. It generates a file with a name similar to "package-version.tar.gz" in the current directory. Package and version are the Am_init_automake (package, version) that we define in configure.in;>>make Distcheck: Generate and test the release package to determine the correctness of the release package. This action will automatically unpack the package file, then execute the Configure command, and do make to confirm that the compilation does not appear error, and finally promp
Today I turned over the old data and found something. When the company's servers were not in place (startups had no way).Talking about the server, a colleague took out his raspberry Pi.I think, I can do it. Go would have supported multiple platforms. Redis is written in C and should not be a problem.Finally, although the middle walk a little detour, but fortunately, can run up.Golang:1. Download the 1.4.2 source package from the official website. Do n
Http://blog.csdn.net/c80486/article/details/8460325
If Raspberry Pi is made into an electric appliance, several actions must be supported when it is powered on.
1. Automatic Logon
2. automatically run the startx startup Window System
3. After the window system is started, it automatically runs the custom program (generally the main interface of the application)
The complete effect of these 4 battles is: Let the Raspberry Pi send its own IP address to the mailbox automatically by mail.Combat 2 : http://blog.csdn.net/make_app/article/details/47305179Combat 3 : http://blog.csdn.net/make_app/article/details/47305337Combat 4: http://blog.csdn.net/make_app/article/details/473053870. System EnvironmentRaspberry
40 Gpio on a Raspberry Pi is the best thing to play.They can be directly controlled by c,/c++, Python, Java and other languages.Now, let's see how to do the same thing with node. js.Before you try, install node. js, and move to: 1. Prepare the Test foldermkdir/home/pi/documents/test-gpio-demo/2. Create a file Package.json{ "name":"Test-gpio-demo", "version":"0.
Beginner Python , try to change the program that was previously written in C on the Raspberry Pi. Python version of the. Four-bit common yin digital tube and Raspberry Pi Circuit connection method is as follows:A ~ p-------------------------------GPIO0 ~ GPIO7D1 ~ d4-----------------------------GPIO11 ~gpio8Here is the
Raspberry PI Series--bare metal illuminated LED lightsBackgroundRecently just bought Raspberry PI B +, configured to run the official Raspbian system, tossing a week Linux system, feel no meaning, so try to understand the bottom of the start process, through a few days of research, It is found that the boot of the lowe
entire introduction of programming features, the language function of most programming books, but to guide the reader with curiosity, with questions to learn, master the Python programming language, Then write a real and useful program."Easy to learn Python" is divided into 3 parts, a total of 12 chapters, the 1th section describes why the use of Python programming. Starting from the 2nd part, the author Hunt The Wumpus game to lead the reader to und
First, basic settings
1
sudo raspi-config
Move to the fifth "Enable Camera", enter, press the TAB key to switch to "enable" to confirm the return. Back to the main menu, tab to "Finish" to confirm the return. The Raspberry Pi will restart automatically.or execute a command to manually shut down the machine
1
sudo shutdown-h now
Warning!!!!!!!!!
0. Power supply is micro USB (Android power connector)
1. Download the operating system from the official website and write the memory card with Win32diskimager.
2. Locate the IP and set the static IP under the router:
Command: sudo vi/etc/network/interfaces
Switch
Auto LoIface Lo inet LoopbackIface eth0 inet StaticAddress 192.168.1.88Netmask 255.255.255.0Gateway 192.168.1.1Allow-hotplug Wlan0Iface Wlan0 inet ManualWpa-roam/etc/wpa_supplicant/wpa_supplicant.conf
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.