This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install html-xml-utils | |
mkdir -p bcm2835 && (wget -qO - `curl -sL http://www.airspayce.com/mikem/bcm2835 | hxnormalize -x -e | hxselect -s '\n' -c "div.textblock>p:nth-child(4)>a:nth-child(1)"` | tar xz --strip-components=1 -C bcm2835 ) | |
cd bcm2835 | |
./configure | |
make | |
sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using C to read the MCP3008 10-bit | |
// ADC via SPI | |
#include <stdio.h> | |
#include <bcm2835.h> | |
uint8_t start = 0x01; | |
uint8_t end = 0x00; | |
uint8_t chan = 0x00; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <bcm2835.h> | |
#include <string.h> | |
/*+---------------------------------------------------------+ | |
| | | |
| si7021.c - Read Si7021 temperature and humidity | | |
| over I2C bus using Raspberry Pi | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned char LED_0F[] = | |
{// 0 1 2 3 4 5 6 7 8 9 A b C d E F - | |
0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0x8C,0xBF,0xC6,0xA1,0x86,0xFF,0xbf | |
}; | |
unsigned char LED[4]; //用于LED的4位显示缓存 | |
int SCLK = 2; | |
int RCLK = 1; | |
int DIO = 0; //这里定义了那三个脚 | |
void setup () | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /layouts/shortcodes/foldergallery.html --> | |
<style> | |
div.gallery { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
div.gallery a { | |
flex-grow: 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Syncing failed: | |
Traceback (most recent call last): | |
File "aqt/sync.py", line 376, in _sync | |
File "aqt/sync.py", line 356, in _abortingSync | |
File "anki/sync.py", line 44, in sync | |
File "anki/sync.py", line 592, in meta | |
File "anki/sync.py", line 556, in req | |
File "anki/sync.py", line 441, in post | |
File "requests/sessions.py", line 572, in post | |
File "requests/sessions.py", line 510, in request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SelectAll: | |
TruncateSilence:Action="Truncate Detected Silence" Compress="50" Independent="0" Minimum="0.5" Threshold="-20" Truncate="0.5" | |
Compressor:AttackTime="0.2" NoiseFloor="-40" Normalize="1" Ratio="2" ReleaseTime="1" Threshold="-12" UsePeak="0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SelEnd: | |
Select:End="-0.65" Mode="Set" RelativeTo="SelectionEnd" Start="0" | |
Silence:Use_Preset="User Preset:650ms" | |
SelectAll: | |
CursSelEnd: | |
Repeat:Count="5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
try: | |
# Python 2 | |
from urllib2 import urlopen | |
except ImportError: | |
from urllib.request import urlopen, Request | |
from lxml import etree | |
import re | |
from py_imessage import imessage |