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
#!/bin/bash | |
export p=/sys/class/lego-port/port | |
export s=/sys/class/lego-sensor/sensor | |
export tm=/sys/class/tacho-motor/motor | |
export dc=/sys/class/dc-motor/motor | |
export sv=/sys/class/servo-motor/motor | |
rmmods () { | |
modprobe -r wedo |
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 python | |
import time | |
LED_PATH = "/sys/class/leds/ev3:%(color)s:%(direction)s/brightness" | |
def do_up_down(f1, f2, f3, f4): | |
for i in range(0, 256): | |
val1 = str(i) | |
val2 = str(255-i) |
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 python | |
import smbus | |
import time | |
for bus in range(3, 7): | |
curport = (bus - 2) | |
print "bus: %2d port: %2d " % (bus, curport) | |
try: | |
i2c = smbus.SMBus(bus) |
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
<busconfig> | |
<policy user="pulse"> | |
<allow send_destination="org.bluez"/> | |
</policy> | |
</busconfig> |
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
[Unit] | |
Description=Make bluetooth discoverable | |
After=legoev3-bluetooth.service | |
[Install] | |
WantedBy=legoev3-bluetooth.service | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/sbin/hiconfig hci0 piscan |
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 smbus | |
import time | |
for bus in range(3, 7): | |
try: | |
i2c = smbus.SMBus(bus) | |
print "Input port %d:" % (bus - 2) | |
for addr in range(0x01, 0x80, 2): | |
try: | |
for offset in range(0, 24, 8): |
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 python | |
# Python port of the HiTechnic HTWay for ev3dev | |
# Copyright (c) 2014-2015 G33kDude, David Lechner | |
# HiTechnic HTWay is Copyright (c) 2010 HiTechnic | |
import itertools | |
import os | |
import struct |
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 imap folder cannot have children :-( | |
const nsMsgFolderFlagType ImapNoinferiors = 0x04000000; |
NewerOlder