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
############################################################################### | |
# speech-test.py | |
# | |
# Author: electronut.in | |
# | |
# Description: | |
# | |
# Testing Raspberry Pi audio using pyttsx - Python Cross-platform | |
# text-to-speech wrapper | |
# |
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
# backup script for Raspberry Pi | |
# | |
# electronut.in | |
# | |
#!/bin/bash | |
echo Backing up RPi \#1... | |
# set this to Raspberry Pi IP address | |
PI_ADDR="192.168.4.31" |
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
// | |
// Talking to ultrasonic sensor HC-SR04 with an ATtiny84, and | |
// sending distance data using serial communications. | |
// | |
// electronut.in | |
// | |
#include <avr/io.h> | |
#include <string.h> | |
#include <util/delay.h> |
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
############################################################################### | |
# rpi-cat9532.py | |
# | |
# Author: electronut.in | |
# | |
# Description: | |
# | |
# Raspberry Pi communicating with I2C PWM chip CAT9532 | |
# (16-bit Programmable LED Dimmer) | |
# |
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
""" | |
ldr.py | |
Display analog data from Arduino using Python (matplotlib) | |
Author: Mahesh Venkitachalam | |
Website: electronut.in | |
""" | |
import sys, serial, argparse |
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
""" | |
dht11_thingspeak.py | |
Temperature/Humidity monitor using Raspberry Pi and DHT11. | |
Data is displayed at thingspeak.com | |
Author: Mahesh Venkitachalam | |
Website: electronut.in | |
""" |
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
""" | |
upload.py | |
Uploads DFU OTA bootloader to bluey board. | |
Electronut Labs | |
electronut.in | |
""" |
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
static void advertising_init(void) | |
{ | |
uint32_t err_code; | |
ble_gap_conn_sec_mode_t sec_mode; | |
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode); | |
err_code = sd_ble_gap_device_name_set(&sec_mode, |
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
// set adv data | |
void set_adv_data(bool init) | |
{ | |
uint32_t err_code; | |
ble_advdata_t advdata; | |
uint8_t flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED; | |
ble_advdata_manuf_data_t manuf_data; // Variable to hold manufacturer specific data | |
// Initialize with easily identifiable data |
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
""" | |
process_uid.py | |
eg. | |
Input: 80c4a66b-ddb7-46e3-87bc-ae7053faf6ee | |
Output: 0xee,0xf6,0xfa,0x53,0x70,0xae,0xbc,0x87,0xe3,0x46,0xb7,0xdd,0x6b,0xa6,0xc4,0x80 | |
electronut.in |