Search found 168 matches

by v923z
Sat Feb 04, 2017 8:23 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 18033

Re: hiding python code on the board

I thought that only unscramble() was written in C :oops: No, I didn't make that clear, sorry. In most cases I'm doubtful of the merits of going to lengths to decipher someone else's code if it has to be done at disassembly level. Provide a decent programmer with a definition of the problem to be so...
by v923z
Sat Feb 04, 2017 7:53 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 18033

Re: hiding python code on the board

If an attacker can access your hardware he has access to the scrambled code and the key, and has hardware with firmware containing an unscramble() function. So I'm struggling to understand how it is secure. Peter, The scrambled code, or the key would not have to be hidden. I could give both to you ...
by v923z
Sat Feb 04, 2017 7:35 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 18033

hiding python code on the board

Hi all, This question has been raised in various forms, the last occurrence might probably be this: http://forum.micropython.org/viewtopic.php?f=3&t=2842 In short, I would like to hide certain critical portions of my code. It seems to me that there are 3 options. 1. With the cross-compiler, one can ...
by v923z
Tue Jan 10, 2017 12:49 pm
Forum: General Discussion and Questions
Topic: rotating framebuf
Replies: 8
Views: 7937

Re: rotating framebuf

I think it's much better to rotate the display in hardware -- most LCD driver chips have a number of register for controlling the orientation and scrolling of the image. Check the datasheet for your display. This has the advantage of being practically free in terms of CPU cycles. Good point, thanks...
by v923z
Tue Jan 10, 2017 12:47 pm
Forum: General Discussion and Questions
Topic: rotating framebuf
Replies: 8
Views: 7937

Re: rotating framebuf

Code like my writer module https://github.com/peterhinch/micropython-samples/commit/c56753fde0477863cc01352574a8b31edd68534b could easily be adapted for upside down and 90 degree text, This is exactly what I am doing now, but this implies that one has to have 4 sets for each font, or the font has t...
by v923z
Tue Jan 10, 2017 12:42 pm
Forum: General Discussion and Questions
Topic: rotating framebuf
Replies: 8
Views: 7937

Re: rotating framebuf

I understand that the aspect ratio might be a problem, and this is why I mentioned a display upside down. In that case, the text, lines etc. could be re-drawn without having to re-calculate anything.
by v923z
Mon Jan 09, 2017 9:32 pm
Forum: General Discussion and Questions
Topic: rotating framebuf
Replies: 8
Views: 7937

rotating framebuf

Hi all, I was wondering, whether it is possible to rotate the framebuffer. Given that the micropython board has an accelerometer, I think it is only natural to ask, whether the content of a display can automatically be adjusted, if I turn the microcontroller upside down. Transforming the drawing pri...
by v923z
Wed Jan 04, 2017 3:39 pm
Forum: Development of MicroPython
Topic: Suggested standard approach to font handling
Replies: 23
Views: 21870

Re: Suggested standard approach to font handling

Python modules are in many ways similar to classes. Assume font1.py and font2.py use my approach. The following will work: import font1, font2 h1 = font1.height() h2= font2.height() Indeed. I totally overlooked this. :oops: The key technical problem is this. Bitmapped fonts comprise substantial amo...
by v923z
Tue Jan 03, 2017 10:05 pm
Forum: Development of MicroPython
Topic: Build firmware with python drivers.
Replies: 4
Views: 5679

Re: Build firmware with python drivers.

The aim here is to save RAM. If this isn't an issue you can, of course, just copy the driver to the filesystem on your target and execute it from there. There might be other reasons for compiling the code. E.g., if you don't want to make it readable. But this is, perhaps, more like a question: can ...
by v923z
Tue Jan 03, 2017 9:33 pm
Forum: Development of MicroPython
Topic: Suggested standard approach to font handling
Replies: 23
Views: 21870

Re: Suggested standard approach to font handling

I was wondering, how much memory overhead a dictionary adds... That's an interesting technique: I didn't realise convert could do that. How are you dealing with the issue of alignment? I am not sure I see what you mean: if it is the vertical alignment of fonts (i.e., the baseline of characters), th...