Go to advanced search

by sharpapotheosis
Sun Jun 10, 2012 2:36 pm
Forum: Python
Topic: GPIO confusion
Replies: 22
Views: 9174

Re: GPIO confusion

Actually, scrap that: you just use your own variables that you set at the start of your program. That way you can change it without hassle. Ignore the previous question ;P
by sharpapotheosis
Sun Jun 10, 2012 2:35 pm
Forum: Python
Topic: GPIO confusion
Replies: 22
Views: 9174

Re: GPIO confusion

...by creating an abstraction layer that converts from a GPIO value to a pin value means you will always have to have the same physical layout on every rev of the board. If someone was to use the Pi as a reference design they would have to make a 26 pin header and put the pins in the order that the...
by sharpapotheosis
Sun Jun 10, 2012 2:09 pm
Forum: Beginners
Topic: No turning on (resolved)
Replies: 10
Views: 1942

Re: No turning on

JeremyF, if you've got your Pi, you may want to change your signature ;D

OP: did you checksum the image before writing it?
by sharpapotheosis
Sun Jun 10, 2012 1:54 pm
Forum: Python
Topic: Python driving 44780 LCD
Replies: 101
Views: 49702

Re: Python driving 44870 LCD

Instead of having the if elif statements, you could use an array to contain the pins, and cycle through it using a for loop: for example: bits = bin(bits)[2:] pin_numbers = [23,22,21,18] for i in range(4): GPIO.output(pin_numbers[i], bool(bit[i]) I don't know if that's helpful, but it's something I ...
by sharpapotheosis
Sun Jun 10, 2012 1:46 pm
Forum: Python
Topic: GPIO confusion
Replies: 22
Views: 9174

Re: GPIO confusion

Absolutely is. I get fed up of the dumming down excuse by evoking a theoretical average person. I think this is very condescending of you. You can understand it but the average person might not, this is tosh. So what is your excuse to them in counting physical pins and saying "no that is not a GPIO...
by sharpapotheosis
Sat Jun 09, 2012 6:51 pm
Forum: Python
Topic: GPIO confusion
Replies: 22
Views: 9174

Re: GPIO confusion

Sadly this appears to be what the people organising Python have opted for. It's nothing to do with the people "organising python", more to do with the people who wrote this specific library. . The correct name to use is the name of the signal coming out of the chip, because at the end of the day yo...
by sharpapotheosis
Sat Jun 09, 2012 6:36 pm
Forum: Python
Topic: How do you "poll" the keyboard?
Replies: 23
Views: 11210

Re: How do you "poll" the keyboard?

Ah OK, my apologies. Also, I've just found this which confirms exactly what you've just said and goes about implementing it :P
by sharpapotheosis
Sat Jun 09, 2012 3:23 pm
Forum: Beginners
Topic: Replacing boot partition without reimaging SD
Replies: 10
Views: 6710

Re: Replacing boot partition without reimaging SD

Alternatively I think and I'm not promising this to work, but if you copy the contents of the larger partition across to a folder on your Mac, re-flash the SD card and then copy the contents back, that should restore all your settings and files.
by sharpapotheosis
Sat Jun 09, 2012 3:20 pm
Forum: Python
Topic: Decimal to Binary Library
Replies: 12
Views: 5851

Re: Decimal to Binary Library

I didn't know you could do bitshifting like that in python. Cool :P I've used it in arduino stuff before, but it's new to me :P For the OPs sake though, shouldn't you use 0b1 instead of 0x1 to keep it in binary (rather than using hex, which, while it makes perfect sense, is not what we're dealing wi...
by sharpapotheosis
Sat Jun 09, 2012 2:57 pm
Forum: Python
Topic: How do you "poll" the keyboard?
Replies: 23
Views: 11210

Re: How do you "poll" the keyboard?

I don't think you can use pygame in the terminal: it needs a GUI doesn't it?

I might be wrong... :P
by sharpapotheosis
Sat Jun 09, 2012 2:03 pm
Forum: Python
Topic: Decimal to Binary Library
Replies: 12
Views: 5851

Re: Decimal to Binary Library

Yep, it's my python class abilities that are to fault :P Anyway, I've got something working now. The source looks like this: import RPi.GPIO as GPIO class BinaryObject(): def __init__(self, p): self.pin_array = p for i in self.pin_array: GPIO.setup(i, GPIO.OUT) def showBinary(self, x): x = bin(x)[2:...
by sharpapotheosis
Sat Jun 09, 2012 1:42 pm
Forum: Python
Topic: Decimal to Binary Library
Replies: 12
Views: 5851

Re: Decimal to Binary Library

I've put it in a really neat class, except it's not working ;D

I can't seem to get the inheritance from the RPi.GPIO class working...
by sharpapotheosis
Sat Jun 09, 2012 1:11 pm
Forum: Python
Topic: Decimal to Binary Library
Replies: 12
Views: 5851

Re: Decimal to Binary Library

The binary command that yeahbox gave produces a string output. This means we can use python's string handling methods very easily to analyse the string and gain some output from it. In python you can use strings as if they are arrays, which means you can address individual characters. For example: >...
by sharpapotheosis
Sat Jun 09, 2012 12:02 pm
Forum: Beginners
Topic: login
Replies: 16
Views: 43332

Re: login

I had a similar problem when I started. Try typing quite a long sentence for the username, just to check whether your keyboard is working properly with the pi. On my first attempt it wasn't registering all key presses because I was trying to use quite a high powered wireless set. Basically, if you c...
by sharpapotheosis
Sat Jun 09, 2012 11:57 am
Forum: Other projects
Topic: 3d printed case w/Fan Access
Replies: 2
Views: 1550

Re: 3d printed case w/Fan Access

Good job you didn't buy the fan, you don't need one at all. I'm running mine in an entirely closed space (see http://www.raspberrypi.org/phpBB3/viewt ... 204#p90204) and it doesn't get hot even slightly. I remember reading somewhere that it normally operates about body temperature :P
by sharpapotheosis
Thu Jun 07, 2012 4:55 pm
Forum: Beginners
Topic: Linux Commands Cheat Sheet
Replies: 13
Views: 12843

Re: Linux Commands Cheat Sheet

CTRL + z often works also, though I believe (correct me if I'm wrong) that it kills the process without killing any processes started by the original process. Should be OK if you're using command line, but don't try it with GUI applications.
by sharpapotheosis
Thu Jun 07, 2012 11:59 am
Forum: Other projects
Topic: My Design - Opinions?
Replies: 39
Views: 12488

Re: My Design - Opinions?

So I'm going to begin taking orders today! http://i.imgur.com/XD6CKh.jpg Case details: It's made of clear laser cut acrylic. It weighs ~66g (or ~120g with the Pi inside). It measures 95x71x33mm (DxWxH). Here is an album displaying the case in all its glory. http://i.imgur.com/uZNoyh.jpg There are a ...
by sharpapotheosis
Mon Jun 04, 2012 3:57 pm
Forum: Other programming languages
Topic: Vintage Basic
Replies: 16
Views: 8357

Re: Vintage Basic

Installing yabasic on the raspberry pi: Firstly, we need to install the dependencies. This tutorial is assuming you're using the standard debian version. If you're not, there may be some other dependencies you need to install. The first thing we need to do is update our repository listings. Into a t...
by sharpapotheosis
Sun Jun 03, 2012 5:43 pm
Forum: Other programming languages
Topic: Vintage Basic
Replies: 16
Views: 8357

Re: Vintage Basic

It's now sort of unrelated, but I've managed to install yabasic on my Pi (running Debian). It was fairly simple and I've written an interpreter script in python. I'll release a tutorial tomorrow (once I've written it) for those who want to get an easy and basic basic interpreter running on their Pi ...
by sharpapotheosis
Sat Jun 02, 2012 10:38 pm
Forum: Other programming languages
Topic: Vintage Basic
Replies: 16
Views: 8357

Re: Vintage Basic

Oh wow! Ok, it sounds like I needn't bother :P that 5-second boot into a basic prompt sounds exactly like what I had in mind eventually, no networking or fancy stuff, just a prompt. Is there any way of sharing the OS you've made? Is there a tool to turn your SD card into a .img file that other peopl...
by sharpapotheosis
Sat Jun 02, 2012 12:53 pm
Forum: Other projects
Topic: My Design - Opinions?
Replies: 39
Views: 12488

Re: My Design - Opinions?

Anubis: I will have access to the laser cutter next week, so should be able to start shipping then. I'll begin to actually take orders from about Wednesday or Thursday this week :) abishur: There is a small prop for it, which you can best see on this album. On the open view, you can see there is a b...
by sharpapotheosis
Wed May 30, 2012 10:03 pm
Forum: Other projects
Topic: My Design - Opinions?
Replies: 39
Views: 12488

Re: My Design - Opinions?

It weighs in at about 90g, so it's not too heavy. It is sturdy though, I did some drop tests with a prototype from various heights and the Pi shouldn't get damaged. As for the looks, well each to their own but i think it looks pretty good, though having the Pi inside it improves it immensely. Photos...
by sharpapotheosis
Wed May 30, 2012 6:29 pm
Forum: Other programming languages
Topic: Vintage Basic
Replies: 16
Views: 8357

Re: Vintage Basic

I didn't know there was one, though from what I could see when I briefly Googled it, it was an "I wonder if someone will..." rather than any actual progress. If you know otherwise please do tell me, I would be interested to see what they are doing with it. Got my Pi through today so it shouldn't tak...
by sharpapotheosis
Tue May 29, 2012 9:45 pm
Forum: Other projects
Topic: My Design - Opinions?
Replies: 39
Views: 12488

Re: My Design - Opinions?

Sure thing Liam, you're on the list :)
by sharpapotheosis
Tue May 29, 2012 9:19 pm
Forum: Other programming languages
Topic: Vintage Basic
Replies: 16
Views: 8357

Vintage Basic

Now that Haskell is up and running on the Pi, I was hoping (once I receive mine) to get vintage basic compiled and running. Used in conjunction with a python script I found but is on my other computer (I'll get back to you on that one) one could get the Pi running with a basic prompt much like the B...

Go to advanced search