Yes thanks. I have been totally side tracked trying to hook up this scratch python thing. So I haven't got round to it yet.
Cheers
Search found 50 matches
- Mon May 05, 2014 3:13 pm
- Forum: Bare metal, Assembly language
- Topic: gpio led sudo segmentation fault
- Replies: 9
- Views: 4354
- Mon May 05, 2014 10:31 am
- Forum: Bare metal, Assembly language
- Topic: gpio led sudo segmentation fault
- Replies: 9
- Views: 4354
Re: gpio led sudo segmentation fault
Thanks
I will try this.
I will try this.
- Fri May 02, 2014 10:00 am
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Finally got the thing to work in its absolute basic form. Its a Kernighan type HelloWorld GPIO at best. I might post it with the scratch interface showing as well, because for novice like myself was a bit tricky finding out how to do very basic broadcast. Thanks Gerhard and Thomas Preston https://gi...
- Thu May 01, 2014 5:07 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Great that Gerhard
Many thanks for your help
Many thanks for your help
- Thu May 01, 2014 3:51 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Hello, tried some things in python3, and think that something like the following snippet will solve the problem: cmd = 'broadcast hello' # # the length is the number of bytes in the message, not the number of characters. # n = len(bytes( cmd, 'UTF-8')) a = array('b') # convert len to the first four...
- Thu May 01, 2014 3:43 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Well signed char should I say, for b
- Thu May 01, 2014 3:42 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Ok got it.
Typecode.
Char
Typecode.
Char
- Thu May 01, 2014 3:38 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Ok thanks Closest I got for my output was: b'\x00\x00\x00\x10'broadcast"hello" from using def sendCMD(cmd): n = len(cmd) a = [] a.append((n >> 24) & 0xFF) a.append((n >> 16) & 0xFF) a.append((n >> 8) & 0xFF) a.append(n & 0xFF) b = '' for i in list(range(len(a))): b += str(a...
- Thu May 01, 2014 2:24 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Thanks
I will look at this code.
will look how python 3 is handles its 4 byte buffer. It seems that the encoding on 2.7 is much more straight forward. Especially how it concatenates it all.
I will look at this code.
will look how python 3 is handles its 4 byte buffer. It seems that the encoding on 2.7 is much more straight forward. Especially how it concatenates it all.
- Thu May 01, 2014 12:53 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Ok the 4 bytes I get now.
I appends this to the beginning of the string, they are hex values of bytes when displayed, but cast to strings I think
the version in python 3 doesn't perform this well.
Anyway I will keep looking
I appends this to the beginning of the string, they are hex values of bytes when displayed, but cast to strings I think
the version in python 3 doesn't perform this well.
Anyway I will keep looking
- Thu May 01, 2014 12:38 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Thanks
It looks like your code is for use with python 2.7
I am still wondering why the version 3 code doesn't actually work.
I am going to keep looking.
Just trying to understand this 4 byte section yet!
It looks like your code is for use with python 2.7
I am still wondering why the version 3 code doesn't actually work.
I am going to keep looking.
Just trying to understand this 4 byte section yet!
- Thu May 01, 2014 6:40 am
- Forum: Beginners
- Topic: gpio 17,20,25 used for ground
- Replies: 6
- Views: 1068
Re: gpio 17,20,25 used for ground

- Wed Apr 30, 2014 1:52 pm
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
Re: cant find python mesh scratch simple examples
Thanks I am actually after getting an understanding of the mesh python handling. Not many tutorials. Am having to root through code and try and figure it out. But I suppose that's the best way to learn. Its mainly the scratch side that's seems harder. The passing of the strings etc. I am trying to g...
- Wed Apr 30, 2014 12:51 pm
- Forum: Beginners
- Topic: gpio 17,20,25 used for ground
- Replies: 6
- Views: 1068
Re: gpio 17,20,25 used for ground
Ok cheers
The ocr pdf
http://www.ocr.org.uk/Images/129940-rec ... lights.pdf
states pin 17 as ground
The ocr pdf
http://www.ocr.org.uk/Images/129940-rec ... lights.pdf
states pin 17 as ground
- Wed Apr 30, 2014 12:31 pm
- Forum: Beginners
- Topic: gpio 17,20,25 used for ground
- Replies: 6
- Views: 1068
gpio 17,20,25 used for ground
Hi Just trying to find out why the GPIO pins 17,20,25 are ground connections in this circuit http://www.ocr.org.uk/Images/129940-recipe-card-traffic-lights.pdf They are labelled as DNC on this pinout diagram do not connect http://www.hobbytronics.co.uk/image/data/tutorial/raspberry-pi/gpio-pinout.jp...
- Wed Apr 30, 2014 7:43 am
- Forum: Scratch
- Topic: cant find python mesh scratch simple examples
- Replies: 15
- Views: 5679
cant find python mesh scratch simple examples
hi I am looking for a simple example to get me started connecting python to scratch using mesh. I used the examples from http://wiki.scratch.mit.edu/wiki/Communicating_to_Scratch_via_Python_3.x I have python 2.7 and 3.3 The example initially didn't work due to b += a[i] TypeError: Can't convert 'int...
- Tue Apr 29, 2014 4:00 pm
- Forum: Bare metal, Assembly language
- Topic: bootcode.bin start.elf
- Replies: 1
- Views: 1784
bootcode.bin start.elf
Is there anyone who could outline the bootcode.bin start.elf and kernel.img but in the context of older 8 bit systems?
Things were complicated with 8 bit systems, but now its very complicated.
Does the bootcode.bin act as a bios with an instruction set similar to ARM?
Thanks
Things were complicated with 8 bit systems, but now its very complicated.
Does the bootcode.bin act as a bios with an instruction set similar to ARM?
Thanks
- Tue Apr 29, 2014 3:35 pm
- Forum: Bare metal, Assembly language
- Topic: baking pi usb or sd
- Replies: 6
- Views: 2330
Re: baking pi usb or sd
I booted into rasbian copied my bootcode.bin and start.elf onto the SD card along with my kernel.img and it all worked.
So thanks for that.
So thanks for that.
- Tue Apr 29, 2014 3:15 pm
- Forum: Bare metal, Assembly language
- Topic: baking pi usb or sd
- Replies: 6
- Views: 2330
Re: baking pi usb or sd
Seems the Baking Pi tutorial doesn't really mention the files I need
Bit of a non-starter for me that

Bit of a non-starter for me that
- Tue Apr 29, 2014 3:03 pm
- Forum: Bare metal, Assembly language
- Topic: baking pi usb or sd
- Replies: 6
- Views: 2330
Re: baking pi usb or sd
Thanks David The noobs card didn't have a kernel.img image, just some recovery images. It was as if it had not uncompressed into the selected OS or something. If I look at /boot whilst in raspbian I can see the files as expected, but not while the card is in my laptop. Anyway I will try another SD c...
- Tue Apr 29, 2014 9:55 am
- Forum: Bare metal, Assembly language
- Topic: baking pi usb or sd
- Replies: 6
- Views: 2330
baking pi usb or sd
Hi My first question is do I need to format my SD card before adding the kernel.img? Or can I add the kernel.img file to any sd card and boot from that? My current SD card has noobs and that has no kernel.img to rename. I tried just adding the kernel.img but I think it boots slightly differently tha...
- Tue Apr 29, 2014 9:05 am
- Forum: Beginners
- Topic: gpio output
- Replies: 15
- Views: 2005
Re: gpio output
So I can exclude the optocoupler or is this better to have Genuine question, I don't know, but aren't they used because 1) you want no electrical connections between two systems, or 2) you want to prevent the possibility of dangerous voltages entering a system I don't think either applies in your c...
- Tue Apr 29, 2014 8:48 am
- Forum: Beginners
- Topic: gpio output
- Replies: 15
- Views: 2005
Re: gpio output
So I can exclude the optocoupler or is this better to have
- Tue Apr 29, 2014 8:21 am
- Forum: Beginners
- Topic: gpio output
- Replies: 15
- Views: 2005
Re: gpio output
Thanks. That's good. (and I think I bought a Darlington array a few days ago)
That aside if I needed the relay circuit is there a minimum circuit for the gpio on the pi?
That aside if I needed the relay circuit is there a minimum circuit for the gpio on the pi?
- Tue Apr 29, 2014 7:54 am
- Forum: Beginners
- Topic: gpio output
- Replies: 15
- Views: 2005
Re: gpio output
Thanks for the input. It looks like I will need a relay as the transistor as an amplifier doesn't look like it will cut it, although I do not have the spec for the bulb to be sure, but I know a little battery power would definitely work. Rather than use my piface with its relays I am going to create...