Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
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?
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?
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.
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.
*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;
    }
 }
*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.
Remind me what VUSB is?
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.
Where "V" is "Virtual"?
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
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.
*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.
*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.
*bump* I submitted Clove 3 for the Hackaday Prize, which might mean I get to go to SPACE! So please give it skulls, or likes, or whatever it is you do on Hackaday Projects. My "stretch" goal of sorts is to investigate whether a wristband with electrodes, op-amps, some good ADCs, and machine learning can detect finger movement.

http://hackaday.io/project/2701-Clove-3%3A-The-Better-Dataglove
Nice to see more progress on this. Am I correct to assume that you got it typing again?

Good luck on the Hackaday prize!
When you say...."go to space"
a) Awesome
b) They seem surprisingly light on details. Is this like....suborbital enjoy a few minutes of zero G space, or like, week on the ISS space? I'm assuming the former, but I don't actually see where they say what it entails.
AHelper wrote:
Nice to see more progress on this. Am I correct to assume that you got it typing again?

Good luck on the Hackaday prize!
I got it sort of typing again, but the oxidation of the conductive threads continues to be a problem.

elfprince13 wrote:
When you say...."go to space"
a) Awesome
b) They seem surprisingly light on details. Is this like....suborbital enjoy a few minutes of zero G space, or like, week on the ISS space? I'm assuming the former, but I don't actually see where they say what it entails.
More like the former. There's also the option to take a cash prize of about $200,000, and they give you additional money to cover the relevant taxes; that's probably what I'd do.
*bump* They seem to have picked Kickstarter-esque projects as the semifinalists, and I'm not sure that I want my project details up on non-Cemetech places, so I've deleted my project and account there. Perhaps next year, if they hold the contest again. Smile
  
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
Page 3 of 3
» All times are GMT - 5 Hours
 
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