Stormworks: Build and Rescue

Stormworks: Build and Rescue

Stormworks Custom Content Workshop
Find, rate and try out the best community vehicles in Stormworks!
Accelerometers (and how do I make one?)
I can't seem to crack the code on how to make a microcontroller that accurately takes speed as an input and outputs acceleration. I got different values for constant acceleration using different time intervals between readings, none of which were accurate.

I also tried making an odometer in the same microcontroller to much similar avail.

I know I can probably just find one on the workshop, but I'm trying to practice using microcontrollers.
< >
Showing 1-3 of 3 comments
find a few on the workshop then look how they do it so you can learn how to do it then you can make your own
Phil 75 9 Mar @ 4:35am 
Acceleration: Take the difference of velocity in a time interval, could be simply done by using logic block latency; 60 ticks per second.
Odometre: Continuously add the velocity, could be in a function block that adds to itself.
Originally posted by Phil:
Acceleration: Take the difference of velocity in a time interval, could be simply done by using logic block latency; 60 ticks per second.
Odometre: Continuously add the velocity, could be in a function block that adds to itself.

Well I got it working. I changed absolutely nothing for acceleration except for the time interval between readings (delta t) to match 1/60th of a second, which made it work perfectly.

I still don't understand why adding velocity to itself and dividing by 60 works to get distance, but hey, it does, so I won't question it. I was trying to multiply speed times delta t and add it to itself every interval, which worked for larger intervals at constant speed, but for some reason lost accuracy over small intervals.
< >
Showing 1-3 of 3 comments
Per page: 1530 50