Saturday, 24 March 2012

Blackpool LUG Python Workshop Part 2

This week Jon led another Python workshop, and Mike, James and Les were there to learn more.


Python Tutorial Lesson 2
We created a loop that allowed players to have multiple chances at guessing the correct number.




Python Tutorial Lesson 2

If you're guess was too high it said




Python Tutorial Lesson 2

If your guess is too low


Python Tutorial Lesson 2

And if you got it right


Python Tutorial Lesson 2

Jon's workshop was a great introduction to programming, and you can clearly see how easy it was for us to make our little game by looking at our code below.




# Generate a random number

import random
import easygui as eg

secret = random.randint(1, 50)
guess = 0
tries = 1
eg.msgbox (secret)

# Ask for your guess
while guess != secret and tries < 4: guess = eg.enterbox("What is your guess? ") guess = int(guess) # Compare your guess against the number if guess < secret: eg.msgbox ("You're guess is too low") elif guess > secret:
eg.msgbox ("You're guess is too high")
elif guess == secret:
eg.msgbox ("You're answer is correct, well done!")

tries += 1
print tries

# Tell you if your guess was correct

print "The answer was : ", secret
eg.msgbox ( "The answer was: " + str(secret))

# Loop if less than six guesses
Massive thanks to Jon for leading these sessions, it has been a great experience.

Also, thanks to Mike for his sterling work on the donated LED wallboards



ToweLUG Meeting 17/3/12

So this week we had two activities ongoing at the same time (one hardware and one software), whilst people popped in and out of the Google Hangout.

The hardware one was the continued efforts by various members to reverse-engineer the LED display boards donated by Les. This week, Mike was soldering (!) on single-handedly, analysing the circuit design of each of the display modules, and confirming how to light each LED and I think had some discoveries around how to drive the display using some form of multiplexing and the on-board shift registers, and also how to produce different colours the display is capable of.

IMAG0129.jpg

Once this is done, the plan is to use an Arduino to drive the boards. Not sure what the next step is :-)

The other main activity was a programming bootcamp using Python, which was led by Jon. There were two students in the room Les and James, plus Tony part-time on the Google Hangout. During the session, we covered basics such as syntax, commands, the importance of indenting, variables, if blocks, input from the keyboard, data types and type conversion and Python's little gotcha with using integers in calculations. We put this into practice, by writing a number guessing game, which we will build on next time. (Most of the examples were taken from a very good book called 'Hello World' by Carter and Warren Sande).

Screenshot-22

As a side note, James has been on the mailing list for several years(Welcome James), but this was his first time to attend an actual meeting. Anybody else who has so far only been involved through the mailing list is always very welcome to come along to the meetings! :-)

Photos for the meeting were as usual kindly taken by Les and can be found here:
http://www.flickr.com/photos/45703688@N07/sets/72157629604005235/

See you at the next meeting!

Saturday, 10 March 2012

This week, everyone is a GIT

Blackpool LUG met once again, and this time we learnt GIT, the version control system.
Git is a powerful version control framework, that allows users to branch off from the main trunk of code, write their own changes, then request to merge them with the original trunk.

Jon and Simon hack!

Today we setup our GitHub accounts and used the easy to follow Linux instructions (mainly for Ubuntu/Debian) to setup a test repository.
Following this we tried out the command line tools

  • We created an empty folder to contain our Git work.
  • We created a test file using "touch myfile.py"
  • We used "git commit" to commit our changes, this then opened nano so that we could add comments to the code.
  • We then used "git status" to check the status of our folder and it's contents.
  • Then we looked at the log using "git log" to see what we had done.
  • Les then cloned a repo from GitHub, using "git clone git://url_of_git_repo"
Donald researching a project

Donald and Mike carried on with their sterling work hacking the LED wallboards that Les brought in last week.


Arran and Donald talk about LEDs

Today was a busy day, lots of chatting and learning, the LUG still ran their Google Hangout, we had Mike "Heed" Rimmicans and Pete "Dick Turpin" Cannon.



Pete Cannon at Blackpool LUG
Thanks to everyone for coming and see you all next time!

Thursday, 8 March 2012

LUG Meeting 25/2/12

Better late than never I always say! ;-)

*Ahem* - anyway....this week we continue our telepresence experiments (with ourselves taking the place of the beagles), and we have a Google Hangout running again for the whole meeting, using a new spiffy Logitech 9000 super mega HD webcam (as acquired by Mr Pounder). After a while, its support for Linux turns out to be rather less than 'super mega' and Mr P decides he will send it back.

Blackpool LUG Meeting Google Hangout 250212

We also welcome a new LUGger this week - Crawford Orr. We obviously don't extend our usual welcome as he decides to come back next week. Must be the quality of the biscuits. ;-)

The Hangout turns out to have quite a effect on the whole meeting, as LUGgers take it in turns to talk with people in the Hangout, notably Simon (clearly too relaxed to drag his booty over to Blackpool) and Dan the Man who appears to be doing a 'howto' on eating breakfast.

Blackpool LUG Meeting Google Hangout 250212

The jury is out about how this will work going forward, but the assumption is that things will settle down as we get used to having virtual visitors, i.e. just ignore them and get on with our 'stuff'.

Jon was doing an install of Ubuntu Server on a hard disk temporarily fitted into one of Mike's computers (as he was too lazy to carry the whole machine to the meeting). After a false start trying to persuade the machine to boot from a USB stick, Mike donates a blank CD onto which is burned the ISO, and from that point, things seem to go swimmingly. Thanks Mike!

Jon working on his new machine

As you see from the pictures, Mike's new layout means that all of the action takes places along one wall of the room, so we spend a fair amount of time facing away from each other. Some discussion about future layout alternatives ensues, including the possibility of a 'Geeks of the Round Table' option. However, I do notice that it allows people to decide whether they want to work or just chat (or split their time between both worthy activities) simply by swivelling around. Hmm...interesting. The important thing is that it makes furtive biscuit munching a lot easier now (I notice a significant decrease in the number of biscuits left at the end of the meeting).

The bench

I think Mike and Donald discuss BBC micros, programming, Raspberry Pi, CNC weaving looms and minivans (but I may have misheard).

The gang

There is some discussion between Les, Arran, Tony and Simon about the upcoming development project (to create a monitoring server application using Python and PHP) - more on that in future posts.

All in all, another great session. Here's to the next one!

PS. The full set of pictures taken by Les are located here: http://www.flickr.com/photos/45703688@N07/sets/72157629086421374/

Saturday, 3 March 2012

Todays meeting

Well an interesting morning was had by all those present in person and via Google Hangout if we include the virtual presence then it was a record attendance of 12+.

Present were Les, Tony, Mike, Donald, John and Crawford

on the hangout were.

#Coffee

Philip and Rebecca Newborough, Aijaz, Simon (who joined us at one point while walking the dog), Jonathan, a couple of others I don't know names for including Phil and Rebecca's Daughter and at least one person who dropped in to see what was going on and probably decided we were totally raving mad and promptly left again shortly afterwards.

Blackpool LUG

After the initial novelty of the hangout and saying Hi to those with us virtually we did eventually get down to something, which this week was investigating the the LED display panels that Les had acquired (we are assured perfectly legitimately), he has a bit of paper to prove it.

It's alive!!!!!

One of the boards from the wallboards

After powering one of them up and seeing it display a boot message we (that would be Donald and Mike) decided to dismantle one of them to see how it was put together and what made it tick. It turned out that it is constructed of 8x8 LED blocks that are similar to those you get with an Arduino only larger so it is probable that you could control them using an Arduino which might be the next step in the project.

The vultures circle...




LED Display project brief

This is the Link to all the photos that Les took of this mornings meeting .