## Search found 25 matches

Mon Dec 31, 2012 7:17 pm
Forum: Python
Topic: A program disaster: becoming inevitable
Replies: 16
Views: 3347

### Re: A program disaster: becoming inevitable

I would very much like to know what advantage would there be in converting the dot-dash strings ".--." into zero-one arrays? Yes, in a very low-level time-critical application it would be best to encode these as one/two byte variable length bit-fields or something, but come on guys, this is Python ...
Mon Dec 31, 2012 3:10 pm
Forum: Python
Topic: A program disaster: becoming inevitable
Replies: 16
Views: 3347

### Re: A program disaster: becoming inevitable

Ones and zeros work just fine, as long as you do it properly. I didn't mean the number (binary or decimal) 010 for dot-dash-dot, I meant the sequence or list [0, 1, 0]. Well exactly - ones and zeros alone won't work. Putting them in a list like that is one way of sorting it, of course. :) Which is ...
Mon Dec 31, 2012 9:26 am
Forum: Python
Topic: A program disaster: becoming inevitable
Replies: 16
Views: 3347

### Re: A program disaster: becoming inevitable

Ones and zeros work just fine, as long as you do it properly. I didn't mean the number (binary or decimal) 010 for dot-dash-dot, I meant the sequence or list [0, 1, 0]. morse_code = [0, 1, 0] for signal in morse_code: if signal == 0: print "dot" # or a dot() function which does the proper GPIO outpu...
Sat Dec 29, 2012 8:54 pm
Forum: Python
Topic: A program disaster: becoming inevitable
Replies: 16
Views: 3347

### Re: A program disaster: becoming inevitable

In addition to the feedback already given, I would recommend making a general output function, rather than one for each letter. It would make the code more compact and more easy to modify. To do this, you need to separate your representation from your logic. First, figure out a way to represent dots...
Wed Dec 26, 2012 9:54 pm
Forum: C/C++
Topic: LED CPU Meter (GPIO)
Replies: 10
Views: 6480

### Re: LED CPU Meter (GPIO)

Hello, I was looking through your source code and came across a small bug; it's very easy to do, I've go to admit I've done this with unsigned ints. // Initalise all LED's and default them off for(int i=0; i < number_leds; i++) On the 5th iteration we'll ping the LEDs then execute the statement in ...
Fri Dec 07, 2012 8:59 am
Forum: C/C++
Replies: 9
Views: 3004

jotta wrote: I use the following command line: gcc -o my_program my_program.c -Ipthread
That's supposed to be a lower case L, not an upper case i in -lpthread. Fix that and the linker should find it.
Thu Dec 06, 2012 9:09 pm
Forum: Bare metal, Assembly language
Replies: 19
Views: 6747

Well, you did write
Here is where I start to question the process
and
I fail to see the usefulness of that.
Can you see why someone might interpret that as questioning the usefulness of the existing bootloaders?
Thu Dec 06, 2012 8:15 pm
Forum: Bare metal, Assembly language
Replies: 19
Views: 6747

I don't get it; why do you question the usefulness of an optional piece of free software, when you apparently know the answers to your own questions and have the skills to do it better yourself?
Thu Dec 06, 2012 7:19 pm
Forum: Bare metal, Assembly language
Replies: 19
Views: 6747

The bootloader obviously isn't intended for persistent programs. It's intended for use during the development phase, so that you won't have to copy your program/kernel to the SD card every time you have an update to evaluate. If you want it persistent, just replace the bootloader with your program o...
Thu Nov 29, 2012 10:42 pm
Forum: Python
Topic: invalid Syntax
Replies: 1
Views: 780

### Re: invalid Syntax

I assume you copy-pasted your script from somewhere. The "cat <<" is not a python command, but a shell command. What you copied was supposed to be run in a terminal to generate a python script, not be pasted into the script itself. Either paste all of it again into a regular terminal prompt and then...
Thu Nov 29, 2012 8:13 pm
Forum: Bare metal, Assembly language
Topic: Screen as a serial terminal
Replies: 7
Views: 13966

### Re: Screen as a serial terminal

I wrote a very simple xmodem sender for exactly this purpose. It still only has the most basic functionality, but it works. Try it out if you like, just download the code from https://github.com/Vassius/xmUtil
Wed Oct 03, 2012 11:51 am
Forum: Bare metal, Assembly language
Topic: Cambridge OS tutorial
Replies: 12
Views: 3756

### Re: Cambridge OS tutorial

I have the template, put main.s in that directory with the makefile and get this: arm-none-eabi-ld --no-undefined -Map kernel.map -o build/output.elf -T kernel.ld make: arm-none-eabi-ld: No such file or directory make: *** [build/output.elf] Error 1 This indicates that the make script can't find th...
Sat Sep 29, 2012 8:57 am
Forum: Beginners
Topic: bash: ./main: Permission denied
Replies: 21
Views: 16660

### Re: permission denied

Could you post the output of

Code: Select all

``ls -la``
in the directory containing these files?
Sun Sep 16, 2012 10:37 am
Forum: Beginners
Topic: Tip for command line / terminal use
Replies: 25
Views: 8013

### Re: Tip for command line / terminal use

The Captain wrote: The trouble with Linux specific console commands is that they won't work via SSH, Webmin or any other form of remote terminal. Mine is a more compatible solution but yes it could do with a warning too.
Tab completion works just fine via SSH.
Thu Aug 09, 2012 6:18 pm
Forum: General programming discussion
Topic: Help with an machine vision project!!!
Replies: 7
Views: 2707

### Re: Help with an machine vision project!!!

Reaching for the stars, are we? ;) Since you posted this in the beginners section, I will assume that you don't have much experience with programming. Please correct me if I'm wrong. There's no shame in reaching for the stars or diving in the deep end of the pool etc, but to successfully do so with ...
Mon Aug 06, 2012 7:14 pm
Forum: C/C++
Topic: could not install geany
Replies: 5
Views: 5084

### Re: could not install geany

You need a working internet connection to install packages using apt-get, unless you have a local repository set up and listed in /etc/apt/sources.list If you need help setting up the network, you may want to use the proper forum section since it's not a programming specific issue. A quick search mi...
Mon Aug 06, 2012 12:30 pm
Forum: C/C++
Topic: could not install geany
Replies: 5
Views: 5084

### Re: could not install geany

KenT wrote:Could just be website temporarily unavailable, try again.
This is a DNS issue, not a server issue. Unless the server is a DNS server resolving its own name, the problem is either at the client side or somewhere else in the DNS lookup chain.
Mon Aug 06, 2012 7:33 am
Forum: C/C++
Topic: could not install geany
Replies: 5
Views: 5084

### Re: could not install geany

Does you Pi have a working internet connection? The apt-get command attempts to fetch packages from the internet, and since the name resolution fails, I suspect your network configuration is faulty.
Sun Jul 29, 2012 10:03 pm
Forum: Python
Topic: How to make python run a var
Replies: 9
Views: 1744

### Re: How to make python run a var

I have a hard time understanding why you would need such a complex solution. If you tell us what you need to accomplish, maybe we could suggest a simpler solution?
Sat Jul 28, 2012 10:14 pm
Forum: Beginners
Topic: nginx - pre-compiled vs. self-compiled
Replies: 1
Views: 1136

### Re: nginx - pre-compiled vs. self-compiled

Type: which nginx This will tell you which location has precedence in your shell's \$PATH variable. Most likely the new version isn't even in \$PATH. But that doesn't matter, since the full path is in the init script. You could execute with the full path just to make sure the init script points to the...
Tue Jun 26, 2012 6:58 am
Forum: General discussion
Topic: Make it EASY for noobs
Replies: 36
Views: 6814

### Re: Make it EASY for noobs

One problem I've seen quite frequently on this forum is a flood of low-quality answers which obscure the high-quality answers. Sometimes when a newbie asks a question with a fairly simple answer, there tend to be several irrelevant answers or investigative counter questions from users who try to be ...
Mon Jun 25, 2012 9:57 pm
Forum: General programming discussion
Topic: where to start? (learning C, C++)
Replies: 19
Views: 9372

### Re: where to start?

... not just reading as i've never learnt overly well by reading and writing, i do learn best by doing, that'd be great. Sorry, but to be able to do anything more than simple copy-paste of tutorial code, you need to do some serious reading to understand the fundamentals of how a specific language w...
Tue Jun 12, 2012 12:58 pm
Forum: General discussion
Topic: RS sent me 2 Raspberry Pis by accident
Replies: 30
Views: 6346

### Re: RS sent me 2 Raspberry Pis by accident

Mon Jun 11, 2012 6:02 am
Forum: C/C++
Topic: - Help - Programming a simple OS
Replies: 28
Views: 10209

### Re: - Help - Programming a simple OS

Altough I agree with Vassius, and the OP will probably understand why after perusing Tannenbaum's book, I still think this is an important endeavour. Indeed, making your own OS can be good way to learn new skills. However, you should not do it while learning to become a good programmer. OS dev is a...
Sun Jun 10, 2012 8:49 pm
Forum: C/C++
Topic: - Help - Programming a simple OS
Replies: 28
Views: 10209

### Re: - Help - Programming a simple OS

OS development requires a lot of skills, both in programming and hardware. Unless you're a very experienced programmer, you will struggle a lot. And I'm sorry to say this, but if you're hesitant about learning another language, you might not have the required mindset. Programming is not about knowin...