CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 126 users online: 5 members, 93 guests and 28 bots.
Members: Ashbad, tifreak8x.
Bots: VoilaBot (1), Spinn3r (2), MSN/Bing (1), Magpie Crawler (3), VoilaBot (2), Googlebot (18), MSN/Bing (1).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
    » Goto page Previous  1, 2, 3
» View previous topic :: View next topic  
Author Message
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 26 Aug 2011 12:21:59 am    Post subject:

It seems like it would make sense to sort the thick branches with an LRU mechanism rather lexically, and then lexically sort the bin contents for improved searchability?
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55770
Location: Earth, Sol, Milky Way

Posted: 26 Aug 2011 12:28:12 am    Post subject:

elfprince13 wrote:
It seems like it would make sense to sort the thick branches with an LRU mechanism rather lexically, and then lexically sort the bin contents for improved searchability?
LRU might be good, although I worry that the overhead of shuffling the LRU list might outweigh the benefits. With an NxN array for N pressable T9 keys, a simple constant-time lookup would give the bin location after two keys were pressed (I guess (N+1)xN to give special cases for one-key words). Am I underthinking the problem?
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 26 Aug 2011 12:35:30 am    Post subject:

KermMartian wrote:
Am I underthinking the problem?


I was thinking an actual tree structure might use memory more efficiently than an NxN array (given the improbability of certain key combinations being in your dictionary).

[edit]

That is probably less valid with physical keys than with alphabetical keys, but possibly still worth investigating.

What if you do a 3-key index, but only (permanently) store the first 2 keys in RAM, and load only a slice of the cube from the SD card based on which key is pressed first. That way RAM only has to accommodate 2x N x N arrays, but you likely retain the benefits of a 3-key index. SD key cards are slower than RAM, but I bet they aren't slower than human reflexes. Even someone pushing 200 keys a minute leaves you 300ms to load the bytes from the card.
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55770
Location: Earth, Sol, Milky Way

Posted: 26 Aug 2011 08:29:51 am    Post subject:

Hmm, I like that idea. Actually, perhaps you're right that an unbalanced radix-N tree would be better for an N-key chording application such as this, with the deepest RAM branches on the heaviest/most-frequently-used sequences, and the shallowest on the rarest sequences.
_________________


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55770
Location: Earth, Sol, Milky Way

Posted: 30 Aug 2011 05:10:53 pm    Post subject:

*bump* C/C++ coders, please help me track down the errors in the following. Basically, when I start up the glove, all the linestates elements are 0, as they should be. When I touch contacts together, some register, some do not. The main problem is that when I release them, the linestates elements don't get reset to zero, until I restart the glove. Does anyone spot errors in my nibble-packing code? I've stared at it and can find nothing bad.


Code:
 for(int i = 0; i < 1<<addrlines; i++) {
    digitalWrite(addr0,(i&0x01)?HIGH:LOW);
    digitalWrite(addr1,(i&0x02)?HIGH:LOW);
    digitalWrite(addr2,(i&0x04)?HIGH:LOW);
    digitalWrite(addr3,(i&0x08)?HIGH:LOW);
    delayMicroseconds(10);
    int linestate = (0x0F) ^ (digitalRead(d0)<<3 | digitalRead(d1)<<2 | digitalRead(d2)<<1 | digitalRead(d3));
    if (i&0x01 == 0) {
        linestates[1+(i>>1)] = (linestate<<4);
    } else {
        linestates[1+(i>>1)] |= linestate;
    }
 }

_________________


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55770
Location: Earth, Sol, Milky Way

Posted: 05 Apr 2012 05:02:26 pm    Post subject:

*necro-bump* Played around with the VUSB code for the "base station" today. Still don't understand why it doesn't identify properly to the PC; I flashed the microcontroller with the gCn firmware, which worked, so the USB connection and power circuit is correct. The investigation into the notoriously fiddly VUSB continues.
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 09 Apr 2012 12:58:55 am    Post subject:

Remind me what VUSB is?
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55770
Location: Earth, Sol, Milky Way

Posted: 09 Apr 2012 12:59:56 am    Post subject:

elfprince13 wrote:
Remind me what VUSB is?
It's the AVR/Atmega library for bit-banging the USB slave protocol on sufficiently-fast microcontrollers. It takes hella tweaking to get right though, unfortunately.
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 09 Apr 2012 01:00:41 am    Post subject:

Where "V" is "Virtual"?
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55770
Location: Earth, Sol, Milky Way

Posted: 09 Apr 2012 01:05:54 am    Post subject:

elfprince13 wrote:
Where "V" is "Virtual"?
Precisely so! You can read more about it here, if you fancy it for any of your own microcontroller-based projects and you don't want to spend money on a uC with built-in USB support:

http://www.obdev.at/products/vusb/index.html
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 09 Apr 2012 01:10:17 am    Post subject:

KermMartian wrote:
elfprince13 wrote:
Where "V" is "Virtual"?
Precisely so! You can read more about it here, if you fancy it for any of your own microcontroller-based projects and you don't want to spend money on a uC with built-in USB support:

http://www.obdev.at/products/vusb/index.html


That actually might be helpful. I've been thinking for a while about making a gameboy ROM dumping tool to backup my pokemon blue version before the battery expires, supposedly sometime this year.
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55770
Location: Earth, Sol, Milky Way

Posted: 03 Oct 2012 10:02:49 am    Post subject:

*bump* So I got my two Stellaris Launchpads, and since they are more capable chips than the ATMega328's, including an on-board USB host and slave controller, I think it would be a good idea for me to use one of them to build the Clove 3 "base station". Presumably I can talk to an SD card fairly easily too, especially since the Stellaris spits out regulated 3.3V and has 3.3V GPIOs, unlike the ATMegas.
_________________


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55770
Location: Earth, Sol, Milky Way

Posted: 06 Oct 2012 08:14:48 pm    Post subject:

*Another bump* I charged up Clove 3 and wired up the receiver to my Arduino, and although the accelerometer still sends perfectly valid data, I can't get any keypresses at all. I'm wondering if the conductive thread has oxidized over time and increased its resistance, a distinct possibility as I've even noticed the thread on the spool oxidizing over time. Although I eventually discovered a way to make the thread not fray when I attached it to the glove, I have found it to be quite frustrating. I'm considering more reliable alternatives.
_________________


Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3
» View previous topic :: View next topic  
Page 3 of 3 » All times are GMT - 5 Hours

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.036836 seconds.