Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - Thorsten

2
USB Infrared Toy / Wrong frequency calculation?
Hi there,

I'm currently doing my first steps with the USB IR Toy and the Pyton module. I want to implement some more functions to the python module (and share it, of course), but I got some issues that I can't explain to myself. Im trying to implement the frequency detection with the help of this documentation: http://dangerousprototypes.com/docs/USB ... pling_mode

My calculation (based on the docs) return some strage values, that can't be right, no matter where I place the remote (near, far).

Based on this example:
{00}{F4}{02}{43}{03}{91}{01}{B3}

0x00f4 - start timer
0x0243 - timer 1
0x0391 - timer 2
0x01b3 - total count of infrared modulated light pulses

PIC timer Period 1 count = 0x0243-0x00f4=0x14F (334)
PIC timer Period 2 count = 0x0391-0x0243=0x14E (333)
Total infrared pulse count = 0x01b3 = 435

I do my calculations like this:
{5c}{92}{f9}{41}{2b}{eb}{00}{01}

0x5c92 - start timer
0xf941 - timer 1
0x2beb - timer 2
0x0001 - total count of infrared modulated light pulses

PIC timer Period 1 count = 0xf941-0x5c92=0x9caf (40111)
PIC timer Period 2 count = 0x2beb-0xf941=-0xcd56 (-52566)
Total infrared pulse count = 0x0001 = 1

The result looks wrong to me, especially because of the negative value of the second calculation. In the example the results of calculation 1 and calculation 2 are really close to each other - mine are really far from each other ^^

I'm currently using USB IR Toy v2 with the 2.2 Firmware.

Can somebody please help me?

Greetings,
Thorsten

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01162281856session_write_close ( )...(null):0
20.01192413448ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01192414224Database_MySQL->query( ).../DatabaseHandler.php:119
40.05262552960Database_MySQL->error( ).../Db-mysql.class.php:273