Jump to content
pestilence

Ardunio Reflex

Recommended Posts

I modded Terifire's TerBoltable Widget

 

A Yellow led lights up on my Ardunio-uno when i am bolt-able and turns off when not

would of done something different but don't have any lcds or more then 2 leds :(

Again the TerBoltable is Terifire's widget i just modded it a little

go check it out its a cool widget

 

This was just for fun... but i cant wait to see what MAD_JIHAD who i met here on the forum makes when i give him the sources :D

1032eb8cb6.jpg

ac7a35a5e1.jpg

5cd04f7fa7.jpg

a7503e65e9.jpg

Share this post


Link to post
Share on other sites

How on earth are you making Reflex communicate with an arduino? I admittedly know nothing about arduinos but I wasn't aware that you could import custom libraries into Lua, and I'm not sure how it'd be doable otherwise, unless you are literally pixeltesting.

Share this post


Link to post
Share on other sites

ya

the game widget is saving a value in the game.cfg and is saving the game.cfg only once if the bool value has changed
then a program i made stores the game.cfg into a string, using a file watcher or timer optionally to check for changes
it then parses out the saved value and sends it to the arduino through serial.

Edited by pestilence

Share this post


Link to post
Share on other sites

Nice, I need to figure out some stuff so I can display health on my 7 segment display.

I need to figure out how many changes to the cfg file are possible per second before performance becomes an issue.

Im just busy working on my map ATM.

This is similar to what my set up looks like.

 

Share this post


Link to post
Share on other sites

Saving the health on every value changed for the lcd would probably be impacting but
lighting up the row of lights for health using percentages should be alot less impacting

The game.cfg is small about 8kb so idk how performance hitting it would really be

Edited by pestilence

Share this post


Link to post
Share on other sites

The file size wouldn't be the problem, the whole process of opening the file for writing and closing it would be I think.

Cool stuff, though I don't think having an external LED/LED Display is of any use. It would be interesting if you could come up with a calm technology solution for implementing this.

E.g. a cooling fan aimed at the users that spins faster when he/she is boltable/low on hp, the thought being that he/she will sweat more.

Share this post


Link to post
Share on other sites

I'm not entirely sure how it'd work in practise (or whether it would break everything) but you could use Lua's coroutine library to attempt to do the file read/writes on a second thread. Last time I checked Reflex did have coroutine available, if I recall correctly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×