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
# Basic stack implementation | |
class Stack: | |
def __init__(self): | |
self.items = list() | |
def isEmpty(self): | |
return self.items == [] | |
def push(self, 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
# Modified from https://pimylifeup.com/raspberry-pi-distance-sensor | |
import RPi.GPIO as GPIO | |
import time | |
try: | |
GPIO.setmode(GPIO.BOARD) | |
PIN_TRIGGER = 7 | |
PIN_ECHO = 11 |
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
//Reference: Exploring BeagleBone - Derek Molloy | |
#include<iostream> | |
#include<fstream> | |
#include<string> | |
#include<sstream> | |
#include<unistd.h> | |
using namespace std; | |
#define LDR_PATH "/sys/bus/iio/devices/iio:device0/in_voltage" |
NewerOlder