Skip to content

Commit f4c0551

Browse files
author
camilo
committed
fix arduino mandani example
1 parent b832b93 commit f4c0551

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/mamdani_tipper/mamdani_tipper.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ void setup() {
4040
}
4141

4242
void loop() {
43-
real_t serviceScoreValue = mapMinMax( analogRead(servicePin), 0, 1023, 0.0f, 1.0f );
44-
real_t foodScoreValue = mapMinMax( analogRead(foodPin), 0, 1023, 0.0f, 10.0f );
43+
real_t serviceScoreValue = map( analogRead(servicePin), 0, 1023, 0.0f, 1.0f );
44+
real_t foodScoreValue = map( analogRead(foodPin), 0, 1023, 0.0f, 10.0f );
4545

4646
tipper.setInput( service, serviceScoreValue );
4747
tipper.setInput( food, foodScoreValue );
48-
48+
4949
tipper.fuzzify();
5050
if ( tipper.inference() ) {
5151
tipper.deFuzzify();

0 commit comments

Comments
 (0)