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
export TERM="xterm-color" | |
export PS1='☠️ \[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ ' |
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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=<Insert country code here> | |
network={ | |
ssid="<Name of your WiFi>" | |
psk="<Password for your WiFi>" | |
} |
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
import requests | |
import csv | |
from bs4 import BeautifulSoup | |
# Establish a session. | |
session = requests.Session() | |
# Set up important headers. | |
session.headers.update({ | |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:72.0) Gecko/20100101 Firefox/72.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
import pprint | |
import json | |
from googleapiclient.discovery import build | |
service = build("customsearch", "v1", | |
developerKey="DEVELOPER_KEY") | |
res = service.cse().list( | |
q='urinal', | |
searchType='image', |
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 <Adafruit_NeoPixel.h> | |
#define PIN 0 // On Trinket or Gemma, suggest changing this to 1 | |
#define NUMPIXELS 3 // Popular NeoPixel ring size | |
Adafruit_NeoPixel strip(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); |
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 <Servo.h> | |
#define POT_PIN 0 | |
Servo myServo; | |
int val = 0; | |
int servoSetPoint = 90; | |
int servoIncrement = 0; | |
int servoPosition = 90; |
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 <Romi32U4.h> | |
#include <QTRSensors.h> | |
// This example is designed for use with eight QTR-1RC sensors or the eight sensors of a | |
// QTR-8RC module. These reflectance sensors should be connected to digital inputs 3 to 10. | |
// The QTR-8RC's emitter control pin (LEDON) can optionally be connected to digital pin 2, | |
// or you can leave it disconnected and change the EMITTER_PIN #define below from 2 to | |
// QTR_NO_EMITTER_PIN. | |
// The setup phase of this example calibrates the sensor for ten seconds and turns on |
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
// This #include statement was automatically added by the Particle IDE. | |
#include <MQTT.h> | |
#include "Adafruit_Sensor.h" | |
#include "Adafruit_BME280.h" | |
#define AIO_SERVER "io.adafruit.com" | |
#define AIO_SERVERPORT 1883 // use 8883 for SSL | |
#define AIO_USERNAME "" | |
#define AIO_KEY "" |
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
// This #include statement was automatically added by the Particle IDE. | |
#include <adafruit-drv2605-photon.h> | |
Adafruit_DRV2605 drv; | |
void setup() { | |
Serial.begin(9600); | |
Serial.println("DRV test"); | |
drv.begin(); | |
drv.selectLibrary(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
// This program shows how to read the encoders on the Romi 32U4. | |
// The encoders can tell you how far, and in which direction each | |
// motor has turned. | |
// | |
// You can press button A on the Romi to drive both motors | |
// forward at full speed. You can press button C to drive both | |
// motors in reverse at full speed. | |
// | |
// Encoder counts are printed to the LCD and to the serial | |
// monitor. |
NewerOlder