#avr | Logs for 2014-02-15

Back
[02:21:48] <megal0maniac_afk> zlog
[06:38:01] <The_Coolest> lol @ log, single line?
[17:42:14] <ColdKeyboard> Does this module support WRITING rfid tags?
[17:42:29] <ColdKeyboard> I'm confused because the chip has RX and TX pins...
[17:46:14] <ColdKeyboard> Is there 125KHz "cheap" read/write module?
[17:46:19] <ColdKeyboard> Any recommendations?
[18:18:35] <myself> ColdKeyboard: Which 125kHz read/write standard are you interested in?
[18:22:02] <ColdKeyboard> myself: I don't know, I'm not sure which cards do I have at the moment...
[18:22:08] <ColdKeyboard> I just know they are 125KHz :)
[18:22:58] <ColdKeyboard> And I have EM4095 but I don't have the antenna for it so I would eather make some breadboard for this IC if I could find wire for antenna, or buy already assembled module for RFID
[18:28:15] <ColdKeyboard> They are 64-bit EM4102 Manchester Encoded RFID tags
[18:39:18] <sirpatrick> what is the preferred method to store command line option on an embedded platform?
[18:39:57] <Tom_itx> eeprom?
[18:40:23] <sirpatrick> Gotcha
[18:41:03] <sirpatrick> would it be a bad idea to make an array of structs that has the command as a string and then a function pointer to what function should execute when the command is called?
[18:41:26] <sirpatrick> then in input it would loop through the array looking for matches on the string
[18:41:53] <Tom_itx> or a simple case statement
[18:42:20] <sirpatrick> yea I guess that would be less complex
[18:42:26] <sirpatrick> probably should abide by KISS
[18:42:48] <Tom_itx> or KIDS
[18:42:56] <Tom_itx> KISDS
[18:43:17] <sirpatrick> lol don't know that one
[18:43:32] <Tom_itx> same idea
[18:43:45] <PoppaVic> not sure what you mean. SOunds like a dictionary structure.
[18:43:45] <PoppaVic> A lookup table?
[18:43:55] <PoppaVic> I'd use an array of c-strings in progspace, as well as an array of structs with char* to those cstrings. You can't have magic structures w/o the heap
[18:43:56] <sirpatrick> Poppa: Yes that is what I was going fore
[18:44:14] <sirpatrick> okay!
[18:44:16] <PoppaVic> Or, instead of a pointer, an index.
[18:44:27] <sirpatrick> right
[18:45:09] <PoppaVic> As long as you can get between the two, yer gold. If you embed a char-array in the structs, you end up wasting bytes you can't afford to waste on an arduino.
[18:45:26] <sirpatrick> yep!
[18:45:47] <sirpatrick> Also, isn't it considered good practice to order datatypes in a struct from largest to smallest
[18:45:48] <PoppaVic> (or an avr)
[18:46:00] <Tom_itx> you can store lots of values in one byte
[18:46:19] <PoppaVic> "good practice" is something readable and maintainable.
[18:46:27] <sirpatrick> indeed
[18:46:47] <sirpatrick> I am new to embedded stuff so I am trying to learn things the best possible way the first time around
[18:47:49] <PoppaVic> for the strings to reach the structs, easiest is to do a string, zero, index value
[18:47:57] * hjohnson wonders if seson 3 of house of cards will be following frank's spiral downward, or if it will go the other way
[18:47:59] <braincracker> hello my friends
[18:48:06] <hjohnson> er wrong window
[18:48:14] <braincracker> have anyone used flash chips that are on 8GB pendrives?
[18:48:15] <sirpatrick> no spoilers!
[18:48:21] <PoppaVic> in that case, you might be able to bsearch the array, step to the end, snag index and use it on the structs.
[18:48:34] <sirpatrick> PoppaVic, thanks for the tips!
[18:50:01] <sirpatrick> Another question. If I want to read a certain address over SPI from a slave, how would I go about doing that?
[18:58:00] <Tom_itx> depends on the slave
[18:58:35] <sirpatrick> Ok, it is an adxl345
[18:59:16] <Tom_itx> their data sheet would explain it
[18:59:25] <sirpatrick> I found an arduino library, I can just reverse it to use standalone c stuff
[20:57:10] <clever> well thats puzzling, i seem to have misplaced the latest version of this source code
[20:57:23] <clever> cant seem to find it anywhere