Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
Dr. Console  
#1 Posted : Wednesday, December 30, 2015 8:00:43 AM(UTC)
Dr. Console

Rank: Newbie

Groups: Registered
Joined: 12/30/2015(UTC)
Posts: 4
Germany

Was thanked: 2 time(s) in 2 post(s)
Hey Guys,

is there any way to handle float values as output of a custom node?
I'm working on a temperature controlled device, where I need to acess the temperatures in degree celsius, but I can't find a way yet.
I only get int or a float from 0 to 1 what doesn't helps me.

If there isn't a way yet, it's (in my opinion) a feature which has to be implemented asap.
I can't imagine coding without flaots.

NG
Dr. Console
thanks 1 user thanked Dr. Console for this useful post.
sample@email.tst on 4/7/2024(UTC)
EmbrioAdmin  
#2 Posted : Wednesday, December 30, 2015 1:55:01 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Activations are the closest things, but those are clamped to be between -1 and 1. Activation values are important to how things are done in Embrio and it helps to have values in that range. The idea is that values would be converted to that range for processing, then transformed before being written out to a display or something.

What sort of flow or processing are you looking to do to the degree value as a float? I added the whole number input/output type because people requested it, I might do the same for floats if it's really needed, but I'd prefer not to if the same calculations can be done on activations.
thanks 1 user thanked EmbrioAdmin for this useful post.
sample@email.tst on 4/7/2024(UTC)
EmbrioAdmin  
#3 Posted : Wednesday, December 30, 2015 2:03:13 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
In the Embrio way of doing things, if I was working with a temperature it would be transformed into an activation from an arbitrary range. Program flow control in Embrio is done with things like "above or below" nodes, which all work on activations. So if I was controlling a thermostat the input temperature would be converted from say 20 degrees to 120 degrees F into an activation from 0 to 1. It would run through an Above or Below node that would turn on and off a burner. Here it is pasted below. Let me know if that workflow makes sense or you really need a new i/o type.

thanks 1 user thanked EmbrioAdmin for this useful post.
sample@email.tst on 4/7/2024(UTC)
Dr. Console  
#4 Posted : Thursday, December 31, 2015 7:51:32 AM(UTC)
Dr. Console

Rank: Newbie

Groups: Registered
Joined: 12/30/2015(UTC)
Posts: 4
Germany

Was thanked: 2 time(s) in 2 post(s)
Well, first thanks for the fast reply.

I'm building a device, which regulates the temp. in a special box in a very tiny range of abaut 0.5-1°C around a user defined temperature.
Because I don't know the temp the user will define it's hard to do without float values holding the needed precision.
Also I think that the basic types like float, byte, int and string are a must have for a programming software.

If I think back to another project I made with radio modules it's impossible without byte, String, Float and struct types.

I will just for fun try it with the activation output, but I didn't expect much success.

NG
Dr. Console
thanks 1 user thanked Dr. Console for this useful post.
sample@email.tst on 4/7/2024(UTC)
EmbrioAdmin  
#5 Posted : Thursday, December 31, 2015 10:43:15 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
The problem is there isn't much you can do with a float in Embrio. Most nodes do things with activations, the reason I'm hesitant to add more variable types is it would mean adding more nodes to deal with those values. String and integer types are there. In the Embrio philosophy it makes more sense to use 0 and 1 activations for bools. You might be right about floats which might need their own few nodes like integers have now. I'll think more about it.

I still think your best bet is to convert that degree value to an activation using the built in transform function. I think the only issue you might have is letting the user set the range but that would depend on your input system.
thanks 1 user thanked EmbrioAdmin for this useful post.
sample@email.tst on 4/7/2024(UTC)
Dr. Console  
#6 Posted : Saturday, January 02, 2016 3:18:54 AM(UTC)
Dr. Console

Rank: Newbie

Groups: Registered
Joined: 12/30/2015(UTC)
Posts: 4
Germany

Was thanked: 2 time(s) in 2 post(s)
Well, at the moment it's hard to try, because I have another general problem with the seonsor, but if it would work with activation depends on the precision the acctivation works with.

e.g. the devices working range should be -55 to +80°C means 135°C temp range.
At a precision of 0.5°C.
So the actiovation value has to have a presicion of 0.00370370.....
I don't know yet how many decimal numbers you have included.
Would be interestring.

NG
Dr. Console
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error