This Raspberry Pi emulator simulates some of the functions used in the RPi.GPIO library (using python). The intention of this library is educational.
The easiest way is to download the zip file and extract the files in the same working environment of your script. To use the emulator just type the following at the beginning of your script.
from EmulatorGUI import GPIO
This library simulates the following functions which are used in the RPi.GPIO library.
from EmulatorGUI import GPIO
#import RPi.GPIO as GPIO
GPIO.setup(17, GPIO.OUT, initial = GPIO.LOW)
GPIO.setup(18, GPIO.OUT, initial = GPIO.LOW)
GPIO.setup(21, GPIO.OUT, initial = GPIO.LOW)
GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_UP)
GPIO.setup(15, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
GPIO.setup(24, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
if (GPIO.input(23) == False):
if (GPIO.input(15) == True):
if (GPIO.input(24) == True):
if (GPIO.input(26) == True):
except Exception as ex:
GPIO.cleanup() #this ensures a clean exit
Click here to download
This is a brief explanation how to create a Christmas tree that its LEDs are controlled by the end user from a website. The concept is pretty simple. We need to have a server, a website, a database, a relay, LEDs and of course a Netduino. Obviously this concept can be applied on a RaspberryPi.
Here is a step-by-step breakdown structure of what was done:
Step 1 – User enters animation sequence: Selected LED colours with duration in seconds.
Step 2 – Upon submission, the user’s data is stored in MongoDB and emitted via Socket.IO to all connected clients in JSON.
Step 3 – Netduino checks every two seconds with Node.JS if there’s a new animation for playing. If there is, Node.JS gets the data from the database and returns it to Netduino as JSON string. Then Netduino parses the JSON string and plays the animation. Once it finishes, it instructs Node.js to get the next animation.
Step 4 – Another challenging part was how to setup the relay with the batteries, LEDs and Netduino. The following tutorial was followed and implemented: http://www.instructables.com/id/Controlling-AC-light-using-Arduino-with-relay-modu/?ALLSTEPS
I created this game using Unity 3D for a teaching course. The game takes place in World War 2 and contains one single mission. A number of planes are inbound to destroy a town and the objective of the player is to stop the enemy. The player has to translate incoming messages by using ASCII encoding and destroy respective enemy planes.
This game supports assessment for:
- Decimal to ASCII Encoding
- Binary to ASCII Encoding
- Hexadecimal to ASCII Encoding
Click here to download (Runs only on Windows)
Step 1 – First Screen
I’ve been talking with several young programming language students and many of them want to build and develop games. Some of them tried Unity 3D and Unreal Engine on their own but they found the engines very complex to use. I totally understand their situation. These types of engines are used by people that have good understanding in programming and 3D graphics. On the other hand this motivation should not be wasted! I think that at this stage, these students should try to modify high end games and at the same time learn the basics of programming rather than get into detail of how these game engines work.
Call of Duty 4 is the perfect solution for this objective. One can build mods using a programming language that is similar to C# and test the code in an online collaborative environment. I created some notes and decided to share them online. Feel free to use and enjoy 🙂
Pages: 1 2 3 4 5 6 7 8 9 10
I created this game for my masters dissertation. The game idea is based on the famous game World of Warcraft and supports single player and multiplayer game modes. The single player supports only one student while the multiplayer supports two students working together to solve the same task. Both game modes support spectator mode which can be used by any lecturer to act as a facilitator. The game has been developed using Unity 3D and can be played freely on any PC. One must not make any profit on such content.
Click Here to Download Game.
- Runs only on Windows.
- Open Port TCP843 (if game won’t connect with the online Server)
- Only 20 concurrent users allowed
In today’s tutorial we are going to connect Netduino with Android. It is recommended to first read this tutorial to better understand how Netduino works and can be connected to the LEDs.
The first thing that you need to understand is that Netduino can act as a server that accepts web page requests. Based on the content of the web requests, one can turn on/off LEDs. Therefore we can create an Android application that sends HttpPosts and has full control on our LEDs. It sounds easy right?
In our example we hosted the Netduino server locally by connected the Ethernet cable to the router and connected the Nexus 7 via the Wi-Fi.
In the following video, I explain how you can hide 3D objects and making it easier to work on your scene.
What is ‘Data Driven Graphics’?
Data-driven graphics make it possible to produce multiple versions of an image quickly and accurately for print or web projects. For example, you can produce 100 versions of a web banner with different text and images, all based on a template design.
In the following tutorial we are going to read data from a CSV file and automatically create a banner for every row contained in the below dataset.
In our example, we have two layers named as ‘Christmas Tree’ and ‘Background’ acting together as a very simplistic postcard. Yes, it is very simple.
If we open our sample dataset (the CSV Excel file), we can notice that our database is divided into four columns which are the “Name”, “Surname”, “Street” and “Country”. Do you agree that we need to link Photoshop with this database? Yes? Good. Let’s proceed to the next step.
You might ask. What is a Netduino? Netduino is an electronics prototyping platform based on the .NET Micro Framework. Yes, you can use C# and Visual Studio to develop!
To understand how Netduino works we are going to build a traffic lights. I suggest that first you install the .NET Micro Framework on your PC from the following link: http://www.netduino.com/downloads/
For this project we need:
- Netduino 2 (duh…)
- 3 * 47 Ω (resistors)
- 1 Red LED
- 1 Green LED
- 1 Amber LED
One bought the wires, breadboard, resistors and the LEDs from: http://www.ebay.co.uk/itm/121296151553?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT. The Netduino 2 from: https://www.coolcomponents.co.uk/netduino-plus-2-net-c-development-board.html
Ok let’s start…
A solderless breadboard is a construction base for prototyping of electronics and it does not require soldering thus making it reusable. The following video explains better how breadboards work and how to attach resistors and LEDs:
Now that you have a better understanding of how to use a breadboard, we can start building our traffic lights. Finally!
Wire the external LEDs and the resistors as shown in the pictures below:
In the code below you will notice that one has defined three Output Ports. One port is for our green LED and is set for digital Pin 0. The second port is our amber LED and is set for digital Pin 1. The third port is our red LED and is set for digital Pin 3. One is also using the Interrupt Port which is the button on the Netduino. When the button is pressed, the traffic light will change it’s state like in the diagram below.
The Output port supports a method named ‘Write’ which accepts a Boolean value. When a ‘true’ value is passed our concerned LED will light up and vice versa. The ‘Thread.Sleep’ command is used to pause the traffic light from changing it’s state quickly.
Here is the final result: