Go to advanced search

by ghp
Sun Jun 01, 2014 11:59 am
Forum: Scratch
Topic: The Beta Strikes Back; NuScratch beta release
Replies: 214
Views: 34706

Re: The Beta Strikes Back; NuScratch beta release

Hello,

import sounds, Music Loops, Eggs gives a MPEG-Error.
mpeg.png
mpeg.png (11.31 KiB) Viewed 6730 times
Sound is 'playable' then, when I choose proceed.

Regards, Gerhard

System: raspbian.
by ghp
Sat May 31, 2014 5:27 pm
Forum: Scratch
Topic: The Beta Strikes Back; NuScratch beta release
Replies: 214
Views: 34706

Re: The Beta Strikes Back; NuScratch beta release

Hello,

in some places I have seen some squeak error popup.
Scenario:
have a list with data, export to file system (works)
export again to same file name, there is a error popup

Regards, Gerhard
list_export_twice.png
list_export_twice.png (14.56 KiB) Viewed 6765 times
by ghp
Fri May 30, 2014 7:43 pm
Forum: Python
Topic: losing data when using Spidev xfer()
Replies: 1
Views: 769

Re: losing data when using Spidev xfer()

Hello,

try using "list(red)" inside the calls to xfer2. I had same problem and found that xfer2 is writing inside the parameter array. list() is duplicating the array to a copy, so overwriting it does not kill the original.

Regards,
Gerhard
by ghp
Thu May 22, 2014 9:43 pm
Forum: Scratch
Topic: Update: ADC, frequency measurement, IR remote receiver
Replies: 1
Views: 2461

Re: Update: ADC, frequency measurement, IR remote receiver

The PCB have arrived, and a small ATMEL 328 board is set up now. As explained above, I examined an ATMEL 328 as a ADC for scratch. It wanted to have it breadboard friendly and low cost, so I use internal oscillator, DIL package and implemented SPI to program the flashware and used this also for comm...
by ghp
Fri May 09, 2014 4:03 pm
Forum: Scratch
Topic: A new Scratch; pre-alpha-this-will-hurt release
Replies: 91
Views: 31666

Re: A new Scratch; pre-alpha-this-will-hurt release

Hello, I looked for a nice feature in scratch: animated gifs. It Works in win-1.4 and legacy-1.4: import costume, it will load each frame as a separate costume then. Unfortunately, it does not work with nuscratch5-1.4: the import first runs on a breakpoint (ok, it is beta) and then after selecting t...
by ghp
Fri May 09, 2014 1:32 pm
Forum: Scratch
Topic: Scratch and robotics
Replies: 14
Views: 4049

Re: Scratch and robotics

Hello, I thought a while about this coding problem. Problems like this where a 'success feedback' is needed typically need a 'hardware abstraction layer' HAL, handling communication to external device and hiding communication details, timeouts and more. In scratch 1.4, the only way I know to impleme...
by ghp
Thu May 01, 2014 8:08 pm
Forum: Scratch
Topic: STICKY: Bugs and regressions
Replies: 41
Views: 52738

utf8 in remote sensor protocol

bug or feature ? Hello, starting from a thread http://www.raspberrypi.org/forums/viewtopic.php?f=77&t=76056 I did some examinations on the handling of code pages in remote sensor protocol. I send a 'broadcast "test_äöüÄÖÜß"' from remote to scratch which uses popular german umlaut characters. Basic i...
by ghp
Thu May 01, 2014 4:33 pm
Forum: Scratch
Topic: cant find python mesh scratch simple examples
Replies: 15
Views: 5216

Re: cant find python mesh scratch simple examples

Hello, have a look at https://docs.python.org/3/library/array.html?highlight=array#module-array The 'c'-type is no longer supported. And thinking about the problem a while, I found that sockets do not handle characters, but bytes. In single-byte-charactersets, chars and bytes are same, but in utf-8,...
by ghp
Thu May 01, 2014 3:30 pm
Forum: Scratch
Topic: cant find python mesh scratch simple examples
Replies: 15
Views: 5216

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 ...
by ghp
Wed Apr 30, 2014 5:25 pm
Forum: Scratch
Topic: cant find python mesh scratch simple examples
Replies: 15
Views: 5216

Re: cant find python mesh scratch simple examples

Hello, the first 4 bytes are the length of the record in binary. A working sample is, out from my scratchClient software: def send_scratch(self, cmd): n = len(cmd) a = array('c') a.append(chr((n >> 24) & 0xFF)) a.append(chr((n >> 16) & 0xFF)) a.append(chr((n >> 8) & 0xFF)) a.append(chr(n & 0xFF)) tr...
by ghp
Mon Apr 28, 2014 6:07 am
Forum: Scratch
Topic: Pirocon + button input move servo
Replies: 6
Views: 3058

Re: Pirocon + button input move servo

Hello,

is the schema available for this board ? I had a look to the website and could not find anything.
Without a schema, no chance to answer this question.

Regards,
Gerhard
by ghp
Mon Apr 28, 2014 5:57 am
Forum: Python
Topic: GPIO 0 and 1
Replies: 1
Views: 763

Re: GPIO 0 and 1

Hello, GPIO 0,1 have been used on rev1-boards for I2C. On rev2 boards, current version, these went to S5-14, S5-13. See http://elinux.org/RPi_BCM2835_GPIOs#GPIO0 for a table of signals. So there are two options: use a rev1-board, or connect the S5-connector. S5 is the CSI camera interface. If you wa...
by ghp
Sun Apr 27, 2014 6:00 pm
Forum: Python
Topic: Two python RPIO questions.
Replies: 6
Views: 1378

Re: Two python RPIO questions.

Hello, cool project, but I did not notice that you already use RPIO (reading is a high level art). So DMA channel 1 is correct, but will not correct the switchover timings. Think there is some time needed to rewrite the dma data structures, and during this time strange things happen. Possibly hardwa...
by ghp
Sat Apr 26, 2014 6:51 pm
Forum: Python
Topic: Two python RPIO questions.
Replies: 6
Views: 1378

Re: Two python RPIO questions.

Hello,

when I need stable pulse widths, I use RPIO-Library. It has DMA-driven PWM-code. Do not use DMA-channel 0, as this is used by recent raspbian dma-driven x-optimizations.
Regards,
Gerhard
by ghp
Sun Apr 20, 2014 3:24 pm
Forum: Python
Topic: Rotary phone dial
Replies: 5
Views: 2330

Re: Rotary phone dial

Hello, solved this a few months ago. http://heppg.de/ikg/wordpress/?p=115 (in german, sorry). The pulses are quite slow, so polling is sufficent fast to solve this problem. In my scratchClient-Software, there is a doc folder with details in english and the classes needed. http://heppg.de/ikg/wordpre...
by ghp
Fri Apr 18, 2014 5:44 pm
Forum: Python
Topic: Atmel 328 as ADC, frequency measurement, IR receiver
Replies: 0
Views: 531

Atmel 328 as ADC, frequency measurement, IR receiver

Hello, the atmega 328 controller can be used on a breadboard as a cost efficient ad converter. I developed this especially for a scratch project, bus as the sample code is in python it might be interesting for the python-world too. The firmware supports ad conversion with 2 channels, event counter, ...
by ghp
Fri Apr 18, 2014 5:37 pm
Forum: Scratch
Topic: Update: ADC, frequency measurement, IR remote receiver
Replies: 1
Views: 2461

Update: ADC, frequency measurement, IR remote receiver

Hallo, the last days I completed the 'atmel atmega 328 for Scratch' project. The idea is to have a cost efficient way to use this microcontroller on a breadboard as an ADC converter and have additional functions as e.g. event counter, frequency measurement. Firmware and programming software is in py...
by ghp
Thu Apr 17, 2014 3:37 pm
Forum: Scratch
Topic: A new Scratch; pre-alpha-this-will-hurt release
Replies: 91
Views: 31666

Re: A new Scratch; pre-alpha-this-will-hurt release

Hello, found some code which does execute in raspbian-scratch-1.4, but not in nuScratch5. Purpose of this code is to receive some semicolon-separated values in a variable, separate these values, calculate scaling factor and display as a chart on screen. I have extended my atmel-adc-firmware to recor...
by ghp
Wed Apr 16, 2014 5:14 am
Forum: Scratch
Topic: Scratch Piface 8 channel Relay
Replies: 13
Views: 7087

Re: Scratch Piface 8 channel Relay

Hello, think there is still a bug in piface scratch handler. They ignore the record length information in the data coming from scratch. When records are scattered between various junks (which happens quite often), then sync is lost and it will look like communication is lost. See https://github.com/...
by ghp
Tue Apr 08, 2014 7:34 pm
Forum: Java
Topic: Database selection
Replies: 13
Views: 17281

Re: Database selection

Hello, I run mysql on a model B revision 1 to store some timestamps for my dooropen-system. Runs for 375 days now without a break, thanks to an UPS. So mysql is not a problem.
Another option is apache derby I use in various projects.

REgards, Gerhard
by ghp
Wed Apr 02, 2014 4:27 am
Forum: Deutsch
Topic: Temperatur messen und Lüfter ansteuern
Replies: 3
Views: 12168

Re: Temperatur messen und Lüfter ansteuern

Hallo, vor allem wenn Du später das Experiment über das Web steuern möchtest ist der Raspberry ganz gut geeignet. Wenn Du Neuling bist, dann gehe am besten schrittweise vor: - etwas python lernen, 'hello world' und if then else reicht erst mal. - gpio ansprechen. Hole Dir eine LED und einen 1k-Wider...
by ghp
Tue Apr 01, 2014 4:42 am
Forum: Scratch
Topic: Raspberry Pi Scratch GPIO4 and SSH
Replies: 3
Views: 4850

Re: Raspberry Pi Scratch GPIO4 and SSH

Hello, scratch 'as on raspbian' does not have direct access to hardware. It needs a 'remote' client software which does the hardware job, and connection is made based on a socket and 'remote sensor protocol'. On the RPi using GPIO the client software needs to run. Scratch can run on any machine on t...
by ghp
Fri Mar 28, 2014 1:14 pm
Forum: Deutsch
Topic: Serielle Kommunikation zwischen Raspberry und Arduino
Replies: 3
Views: 1304

Re: Serielle Kommunikation zwischen Raspberry und Arduino

Hallo, so wie ich den Code verstehe schreibt der Arduino kontinuierlich seine Messwerte auf die serielle Leitung. Der Raspberry greift jetzt irgendwann Daten von der seriellen Leitung ab. Wenn das innerhalb einer Zeile beginnt, dann liest er nur den Rest der Zeile bis zum Linefeed. Abhilfe wäre entw...
by ghp
Wed Mar 26, 2014 9:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 10 or 12 bit ADC chip I2C dip ?
Replies: 12
Views: 12867

Re: 10 or 12 bit ADC chip I2C dip ?

Another option is to use an atmel atmega328. I have a description for connecting this device by SPI (not I2C) to raspberry on my web page http://heppg.de/ikg/wordpress/?p=164 (only german) . Advantage is the price, comparable to an ADC, resolution is 10 bits and the processor offers other capabiliti...
by ghp
Sun Mar 23, 2014 6:14 pm
Forum: Scratch
Topic: A new Scratch; pre-alpha-this-will-hurt release
Replies: 91
Views: 31666

Re: A new Scratch; pre-alpha-this-will-hurt release

set sprite's rotation point not working.
Hello, I have to take this back. Build several examples and works in all scenario.
Regards, Gerhard

Go to advanced search