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
/* | |
******************************************************************** | |
Name : shiftOutDisplay, Test code | |
Author : Benjo Charlie | |
Date : 13 Sept, 2013 | |
Version : 1.0 | |
Notes : Shiftbit registers can be a little tricky to setup so I | |
: designed this simple Hello World code for doing just that. | |
: This example uses a 74HC595 Shift Bit Register in conjunction | |
: with a common anode seven segment display. |
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
/* | |
******************************************************************** | |
Name : shiftOutAnalogueDisplay, Test code | |
Author : Benjo Charlie | |
Date : 13 Sept, 2013 | |
Version : 1.0 | |
Notes : This is an adaptation of the ReadAnalogVoltage tutorial. | |
: | |
: The idea is to map the analogue input voltage and display that | |
: mapped value on a 7 segment display via a shiftbit register. |
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/python3.4 | |
#----------------------------------------------------------------------------------------------- | |
# Name: A tunnel building program for the avid Minecraft Pi dwarf. | |
# Purpose: Designed to build descending, ascending and straight tunnels in Minecraft Pi. | |
# This is written very simply for debugging/learning purposes. | |
# Most of this code is designed to handle user input. | |
# Eventually this will be integrated into a user interface with QT and pyQT. | |
# Version: Development | |
# Author: benjo charlie | |
# Created: 2016 |
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/python3.4 | |
#-------------------------------------------------------------------------- | |
# Name: A simple compass for Minecraft Pi | |
# Purpose: Designed to indicate NORTH with a red block and SOUTH with | |
# a black block. | |
# Author: benjo charlie | |
# Created: 2016 | |
#-------------------------------------------------------------------------- | |
# Import libraries and set up the globals |
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
BRICK_STAIRS | 108 | |
---|---|---|
COBBLESTONE_STAIRS | 67 | |
NETHER_BRICK_STAIRS | 114 | |
OAK_STAIRS | 53 | |
OAK_STAIRS | 59 | |
QUARTZ_STAIRS | 156 | |
SANDSTONE_STAIRS | 128 | |
STONE_BRICK_STAIRS | 109 | |
STONE_STAIRS | 67 | |
WOOD_STAIRS | 53 |
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
AIR | 0 | |
---|---|---|
BEDROCK | 7 | |
BEDROCK_INVISIBLE | 95 | |
BRICK_BLOCK | 45 | |
CHEST | 54 | |
CLAY | 82 | |
COAL_ORE | 16 | |
COBBLESTONE | 4 | |
CRAFTING_TABLE | 58 | |
DIAMOND_BLOCK | 57 |
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/python3.4 | |
#----------Minecraft Pi Chat---------# | |
#-----------By PieCoder314-----------# | |
#---Bringing chat to minecraft pi!---# | |
# Credit to: PieCoder314/mcpichat.py # | |
from mcpi import minecraft | |
mc = minecraft.Minecraft.create() | |
mc.postToChat("Go to python shell to chat.") |
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/python | |
from random import randrange | |
class Axe(object): | |
def __init__(self): | |
self.start = "Schist!" | |
def gimli(self): |
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
building_blocks = { | |
'AIR': 0, | |
'BEDROCK': 7, | |
'BEDROCK_INVISIBLE': 95, | |
'BRICK_BLOCK': 45, | |
'CHEST': 54, | |
'CLAY': 82, | |
'COAL_ORE': 16, | |
'COBBLESTONE': 4, | |
'CRAFTING_TABLE': 58, |
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
stair_blocks = { | |
'BRICK_STAIRS': 108, | |
'COBBLESTONE_STAIRS': 67, | |
'NETHER_BRICK_STAIRS': 114, | |
'OAK_STAIRS': 53, | |
'OAK_STAIRS2': 59, | |
'QUARTZ_STAIRS': 156, | |
'SANDSTONE_STAIRS': 128, | |
'STONE_BRICK_STAIRS': 109, | |
'STONE_STAIRS': 67, |
OlderNewer