I guess I have to make a topic or else they won't put me in potm. Laughing
(its not like we're ever going to reach March 2022's potm anyway :p )

I decided I should familiarize myself with the C libs so this project is a bit of a learning thing for me. I already have experience with a bunch of other languages, but I've never really done anything beyond a few lines with C or the toolchain. I figured I should be alright?

Anyways I made a little interactive periodic table.



The source code is available here. Feel free to provide feedback, I've been told it needs work. Rolling Eyes

DOWNLOAD
Nice work! Somehow I thought you were already pretty familiar with the c libsÖ anyway it looks great! Is there more info available when clicking on it? Cause TIís official periodic app has stuff like protons, neutrons, melting point, boiling point, etc.
Currently that's all there is to see, I'm pretty much out of room at the top of the table so I would need have a 2nd screen. I might go back and do that.
Edit: I added the 2nd screen with melting points, boiling points and room for more Smile
Wow, this looks really nice! I am by no means an expert in C programming but the elements themselves seem like the perfect opportunity to use structs to organize data rather than really long char arrays. They would allow you to better organize the elements into groupings.
I would also suggest using

Code:
gfx_PrintStringXY("Density: ", x, y);
gfx_PrintString({element density});
gfx_PrintString( " g/L");

gfx_Print___ updates the cursor position so subsequent print statements will print where the curser is currently "pointing". Doing so would remove the constant spacing currently being used to display the properties and units. I'm not fully sure all of the terminology I used is correct, this is just what I have observed while programming.

Keep up the great work!
I don't understand why I didn't think of just printing... Laughing
I agree structs look like a much better way to do this. I'll do that when I have a bit more free time.
EDIT: done.
Greetings:
I would suggest that if you want to be able to add new elements in the future as some have suggested, you should change the Element structure so it can have 3 characters rather then only two. IUPAC got tired of all the fighting over names so any new elements are given temporary names that are just the first letter of the Latin number of that element. Like 118 was for ununoctium which means one-one-eight in Latin (symbol Uuo). Since any new elements will initially have three characters, I don't know how you can fit that into the width of a square in the table.

Also, if particle physicists discover three more elements where would the new series below the actinium go?

You, of coarse, may ignore all of this. Just wondering out loud and trying to save you headaches in the future.
Cool program though. Must have been a pain looking up and entering all that data for all the elements.
stbradley wrote:
Greetings:
I would suggest that if you want to be able to add new elements in the future as some have suggested, you should change the Element structure so it can have 3 characters rather then only two. IUPAC got tired of all the fighting over names so any new elements are given temporary names that are just the first letter of the Latin number of that element. Like 118 was for ununoctium which means one-one-eight in Latin (symbol Uuo). Since any new elements will initially have three characters, I don't know how you can fit that into the width of a square in the table.

Also, if particle physicists discover three more elements where would the new series below the actinium go?

You, of coarse, may ignore all of this. Just wondering out loud and trying to save you headaches in the future.
Cool program though. Must have been a pain looking up and entering all that data for all the elements.

I doubt that new elements would be admitted to the Periodic Table.
ShinyGardevoir wrote:
I doubt that new elements would be admitted to the Periodic Table.


So, could you say that regardless of what they decide to call the next element to be discovered, for you it will be the element of Surprise?
I'm not too concerned about new elements being synthesized, although I could always go back and add a new row if needed (and increase the size of the symbol field assuming they add a whole row with placeholder names) . I did have to increase the size of symbols to 3 bytes to allow room for the null terminator though Laughing
I also added some more info (year discovered, radius and 1st ionization energy)

ShinyGardevoir wrote:

I doubt that new elements would be admitted to the Periodic Table.

So you think that particle accelerators have discovered (created) all the elements that they ever will? I hardly think so.
The next new element will be given a temporary name of ununnovium (for 119) and it's symbol will be Uun until everyone can agree on a permanent name which probably will have only two letters. But that usually takes years.

As for the element of Surprise, I prefer the element of confusion!

While I may know what the various units are of the info, a student or non-chemist may not.
stbradley wrote:
While I may know what the various units are of the info, a student or non-chemist may not.

Yes, I already added some units. It'll be in the next commit.
Greetings:
I just downloaded and compiled your source code for PERIODIC. I got an error on line 296:
"error: use of undeclared identifier 'isAGas'". I commented that line out and it compiled fine. I only received main.c, is there supposed to be a header?

I also had to modify the makefile slightly, but no big deal. That may be because of the way I set things up on my laptop. I didn't really look into why.
Yea, there's no header, I was playing with that variable when doing units, I just pushed the units stuff so that should be fixed now.
I added some more info and the ability to change elements from the details screen (you can now go to the next or previous element with left and right arrows)
I also decided its time to release so its in the downloads section now.

Greetings:
Mass is in amu (atomic mass units) Smile
I've added electron configurations and oxidation states and increased the precision of the masses by 2 decimals to match the precision in TI's app.
Also French, Spanish and Dutch localizations, using your calculator's setting.




These changes bloated the program a little (+3.5kb) but I guess that's the price to pay to avoid splitting the release.
  
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 1 of 1
» All times are UTC - 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

 

Advertisement