element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Pi Chef Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Pi Chef Design Challenge
  • More
  • Cancel
Pi Chef Design Challenge
Blog iTender #3 Communication with the real world
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: justin.berger
  • Date Created: 14 Feb 2018 10:22 PM Date Created
  • Views 1073 views
  • Likes 7 likes
  • Comments 5 comments
Related
Recommended

iTender #3 Communication with the real world

justin.berger
justin.berger
14 Feb 2018

ITender communication with the real world

As announced in the old tickets, I set up two systems with node-red.

 

1.     iTender writes!

 

This is an opportunity to use Sense Hat! my goal is:

-       display the temperature of the cold liquid

-       to mark the name of the cocktail during its preparation

For that on node-red there is node which makes it possible to communicate with Sense Hat: node-red-node-pi-sense-hat.

Here is the procedure I followed to make it work :

1.1 Sense Hat wiring

 

I'm starting to have many GPIOs to use, not to use the same GPIO for 2 different functions I have in place a plan for using raspberry pine. For this I looked for a plan that shows the use of GPIO for the "Sense H at". Here it is

http://mshaughs.blogspot.fr/2017/02/sense-hat-pinout-for-raspberry-pi.html

 

Sense HAT

1

2

Sense HAT

3

4

5V

Sense HAT

5

6

Sense HAT

DS18B20

7

8

Cold circuit circulator

GND

9

10

Peltier 4

Pump 1 Pineapple juice

11

12

Pump 2 Orange juice

13

14

GND

Pump 3 Coca

15

16

Sense HAT

3,3V

17

18

Sense HAT

Peltier 1

19

20

GND

Pump starts cold circuit

21

22

Sense HAT

Peltier 2

23

24

Sense HAT

GND

25

26

Peltier 3

Sense HAT

27

28

Sense HAT

29

30

Pump 4 Cane syrup

31

32

Pump 5 Whisky

33

34

GND

Hot circuit circulator

35

36

Pompe 6 Wodka

Pompe 7 Rhum

37

38

Pump starts hot circuit

GND

39

40

Pompe 8 Perrier

imageimage

 

 

          1.2  Installing node-red-node-pi-sense-hat

image

https://flows.nodered.org/node/node-red-node-pi-sense-hat

 

          1.2.  Display the temperature on the LED matrix

 

For that I realized the following program :

image

[
    {
        "id": "8b83ff25.96996",
        "type": "rpi-sensehat out",
        "z": "756ed309.7d647c",
        "name": "",
        "x": 1130,
        "y": 920,
        "wires": []
    },
    {
        "id": "f05fddd1.88f6f",
        "type": "function",
        "z": "756ed309.7d647c",
        "name": "Rotate 180 Text Red Background No Speed 1",
        "func": "msg.color = \"red\";\nmsg.background =\"0\" ;\nmsg.speed = \"1\";\nmsg.payload = \"R180\\n\"+msg.payload;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 840,
        "y": 920,
        "wires": [
            [
                "8b83ff25.96996"
            ]
        ]
    },
    {
        "id": "13713ce2.a9cfc3",
        "type": "delay",
        "z": "756ed309.7d647c",
        "name": "",
        "pauseType": "delay",
        "timeout": "8",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 720,
        "y": 980,
        "wires": [
            [
                "7ad546f5.031758"
            ]
        ]
    },
    {
        "id": "7ad546f5.031758",
        "type": "function",
        "z": "756ed309.7d647c",
        "name": "OFF",
        "func": "msg.background = \"off\";\nmsg.colour = \"off\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 950,
        "y": 980,
        "wires": [
            [
                "8b83ff25.96996"
            ]
        ]
    },
    {
        "id": "7606b20e.1900cc",
        "type": "rpi-ds18b20",
        "z": "756ed309.7d647c",
        "topic": "FF4D0B851605",
        "array": false,
        "name": "",
        "x": 550,
        "y": 920,
        "wires": [
            [
                "f05fddd1.88f6f",
                "13713ce2.a9cfc3"
            ]
        ]
    },
    {
        "id": "7e4fa775.acd498",
        "type": "inject",
        "z": "756ed309.7d647c",
        "name": "",
        "topic": "FF4D0B851605",
        "payload": "",
        "payloadType": "date",
        "repeat": "25",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "x": 300,
        "y": 920,
        "wires": [
            [
                "7606b20e.1900cc"
            ]
        ]
    },
    {
        "id": "273ab74b.419948",
        "type": "comment",
        "z": "756ed309.7d647c",
        "name": "Launching the program every 25 seconds",
        "info": "",
        "x": 280,
        "y": 880,
        "wires": []
    },
    {
        "id": "2cf48ba3.2ccee4",
        "type": "comment",
        "z": "756ed309.7d647c",
        "name": "Reading the probe",
        "info": "",
        "x": 550,
        "y": 880,
        "wires": []
    },
    {
        "id": "a2e3f705.45e9c8",
        "type": "comment",
        "z": "756ed309.7d647c",
        "name": "Setting the display on Sense-Hat",
        "info": "",
        "x": 830,
        "y": 880,
        "wires": []
    },
    {
        "id": "9253c3c6.c494e",
        "type": "comment",
        "z": "756ed309.7d647c",
        "name": "View on Sense-Hat",
        "info": "",
        "x": 1130,
        "y": 880,
        "wires": []
    }
]

I also did a program that marks the name of the drink when I throw a cocktail.

image

[
    {
        "id": "367f95e4.4b636a",
        "type": "inject",
        "z": "88fe036.c4c23",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "x": 340,
        "y": 1560,
        "wires": [
            [
                "118e46b5.d9c299"
            ]
        ]
    },
    {
        "id": "118e46b5.d9c299",
        "type": "ui_button",
        "z": "88fe036.c4c23",
        "name": "",
        "group": "82b4dd32.05812",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "label": "Whisky - coca",
        "color": "",
        "bgcolor": "",
        "icon": "",
        "payload": "0",
        "payloadType": "num",
        "topic": "",
        "x": 500,
        "y": 1560,
        "wires": [
            [
                "9de3ec76.a7563"
            ]
        ]
    },
    {
        "id": "9de3ec76.a7563",
        "type": "change",
        "z": "88fe036.c4c23",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Whisky - Coca",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 600,
        "y": 1620,
        "wires": [
            [
                "fff8b14.3db765",
                "28a8ecdf.cd3fa4"
            ]
        ]
    },
    {
        "id": "fff8b14.3db765",
        "type": "function",
        "z": "88fe036.c4c23",
        "name": "Rotate 180 Text Red Background Blue Speed 5",
        "func": "msg.color = \"red\";\nmsg.background =\"0\" ;\nmsg.speed = \"1\";\nmsg.payload = \"R180\\n\"+msg.payload;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 880,
        "y": 1620,
        "wires": [
            [
                "71f8d9cf.684ee8"
            ]
        ]
    },
    {
        "id": "28a8ecdf.cd3fa4",
        "type": "delay",
        "z": "88fe036.c4c23",
        "name": "",
        "pauseType": "delay",
        "timeout": "20",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 760,
        "y": 1660,
        "wires": [
            [
                "9880dafa.7480c8"
            ]
        ]
    },
    {
        "id": "9880dafa.7480c8",
        "type": "function",
        "z": "88fe036.c4c23",
        "name": "Rotate 180 Text Red Background Blue Speed 5",
        "func": "msg.background = \"off\";\nmsg.colour = \"off\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 1020,
        "y": 1660,
        "wires": [
            [
                "71f8d9cf.684ee8"
            ]
        ]
    },
    {
        "id": "71f8d9cf.684ee8",
        "type": "rpi-sensehat out",
        "z": "88fe036.c4c23",
        "name": "",
        "x": 1210,
        "y": 1560,
        "wires": []
    },
    {
        "id": "82b4dd32.05812",
        "type": "ui_group",
        "z": "",
        "name": "Cocktail",
        "tab": "477bd088.4ab9e",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "477bd088.4ab9e",
        "type": "ui_tab",
        "z": "",
        "name": "iTender",
        "icon": "dashboard",
        "order": 1
    }
]

 

2.     iTender speaks!

 

And today iTender speaks! A touch of fun in this crazy project!

 

For that I use "node-red-node-watson":

https://flows.nodered.org/node/node-red-node-watson.

I use more specifically the node "text-to-speech" for the configuration I invite you to watch this video :

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

I also use "node-red-contrib-play-audio" : https://flows.nodered.org/node/node-red-contrib-play-audio.

 

Here is the program that announces the name of the drink when I throw a cocktail.

image

 

[
    {
        "id": "efb146df.e35978",
        "type": "ui_button",
        "z": "88fe036.c4c23",
        "name": "",
        "group": "82b4dd32.05812",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "label": "Whisky - coca",
        "color": "",
        "bgcolor": "",
        "icon": "",
        "payload": "0",
        "payloadType": "num",
        "topic": "",
        "x": 520,
        "y": 1340,
        "wires": [
            [
                "b21d17b2.035368"
            ]
        ]
    },
    {
        "id": "7cf61c23.eac3b4",
        "type": "inject",
        "z": "88fe036.c4c23",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "x": 340,
        "y": 1340,
        "wires": [
            [
                "efb146df.e35978"
            ]
        ]
    },
    {
        "id": "b21d17b2.035368",
        "type": "change",
        "z": "88fe036.c4c23",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Whisky - Coca",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 720,
        "y": 1340,
        "wires": [
            [
                "c0e12916.1d2648"
            ]
        ]
    },
    {
        "id": "c0e12916.1d2648",
        "type": "watson-text-to-speech",
        "z": "88fe036.c4c23",
        "name": "Justin_iTender",
        "lang": "fr-FR",
        "langhidden": "fr-FR",
        "langcustom": "NoCustomisationSetting",
        "langcustomhidden": "",
        "voice": "fr-FR_ReneeVoice",
        "voicehidden": "",
        "format": "audio/wav",
        "password": "ti3XDHqn07I1",
        "payload-response": false,
        "default-endpoint": true,
        "service-endpoint": "https://stream.watsonplatform.net/text-to-speech/api",
        "x": 920,
        "y": 1340,
        "wires": [
            [
                "337a73ae.2dc26c"
            ]
        ]
    },
    {
        "id": "337a73ae.2dc26c",
        "type": "play audio",
        "z": "88fe036.c4c23",
        "name": "",
        "voice": "0",
        "x": 1110,
        "y": 1340,
        "wires": []
    },
    {
        "id": "82b4dd32.05812",
        "type": "ui_group",
        "z": "",
        "name": "Cocktail",
        "tab": "477bd088.4ab9e",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "477bd088.4ab9e",
        "type": "ui_tab",
        "z": "",
        "name": "iTender",
        "icon": "dashboard",
        "order": 1
    }
]

In the next report I will show you the cabinet plans, I am currently doing them. I am also thinking about integrating a car part into a machine.

  • Sign in to reply

Top Comments

  • genebren
    genebren over 7 years ago +3
    Very cool. That was a great video showing how to use the Node-Red text/speech tools. This is going to be a really nice addition to your iTender project. Keep up the good work! Gene
  • DAB
    DAB over 7 years ago +3
    Very good post. I am not surprised that the voice to text takes more work. Back in the 1980's we did some work with early voice identification and we found that it worked fine for most people except one…
  • three-phase
    three-phase over 7 years ago +2
    Excellent progress being made, look forward to seeing the cabinet. Kind regards
  • genebren
    genebren over 7 years ago in reply to justin.berger

    Nice looking design.  Keep up the good work.

    Gene

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • justin.berger
    justin.berger over 7 years ago in reply to three-phase

    I finishing the plan. Manufacturing is coming soon!

    image

    Justin

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • three-phase
    three-phase over 7 years ago

    Excellent progress being made, look forward to seeing the cabinet.

     

    Kind regards

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 7 years ago

    Very good post.

     

    I am not surprised that the voice to text takes more work.

    Back in the 1980's we did some work with early voice identification and we found that it worked fine for most people except one engineer from Georgia.  Her southern accent threw off the circuit.  When we tuned the circuit for her, it did not work for any of the rest of us.

     

    So you do have to train your circuit for your voice, but do not be surprised if others cannot use it.

     

    DAB

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 7 years ago

    Very cool.  That was a great video showing how to use the Node-Red text/speech tools.  This is going to be a really nice addition to your iTender project.  Keep up the good work!

    Gene

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube