# Barcode Scanner input

**URL:** <https://discourse.nodered.org/t/barcode-scanner-input/16905>\
**Category:** General\
**Created:** [19 October 2019 23:51 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905 "2019-10-19T23:51:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [19 October 2019 23:51 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/1 "2019-10-19T23:51:01Z")

</div>

Hello guys, I'm new here. I just want to ask if it possible to get input from a Barcode scanner? What node will be most appropriate to get input from a Barcode? Note that the barcode scanner is connected to a client computer and not on the Raspberry PI. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![miker256](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miker256/32/13042_2.png) [@miker256](https://discourse.nodered.org/u/miker256)\
**Post date:** [20 October 2019 00:52 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/2 "2019-10-20T00:52:18Z")

</div>

I would try this out.

> **[node-red-contrib-usbhid](https://flows.nodered.org/node/node-red-contrib-usbhid)**
>
> A node-hid (USB HID device access library) wrapper for nodered

> **[SteampunkProfessor/node-red-contrib-barcode-scanner](https://github.com/SteampunkProfessor/node-red-contrib-barcode-scanner)**
>
> Contribute to SteampunkProfessor/node-red-contrib-barcode-scanner development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [20 October 2019 00:56 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/3 "2019-10-20T00:56:43Z")

</div>

Thanks my friend 🙂

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [21 October 2019 14:29 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/4 "2019-10-21T14:29:54Z")

</div>

The barcode scanner is connected by what means? USB? Network? Serial?

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [21 October 2019 17:21 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/5 "2019-10-21T17:21:13Z")

</div>

Most barcode scanners just act like a keyboard. I've had good luck using the dashboard text input node.

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [21 October 2019 22:36 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/6 "2019-10-21T22:36:29Z")

</div>

Yes, I'm using USB barcode scanner, does a text input in dashboard can detect if the user press "Enter" or " Return" key? Because by default barcode scanner send return key at the end of scan. Thanks my friend.

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [21 October 2019 22:37 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/7 "2019-10-21T22:37:06Z")

</div>

It's USB.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [21 October 2019 22:51 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/8 "2019-10-21T22:51:07Z")

</div>

Yes it should do

---

<div class="post-metadata">

**Author:** ![Steampunk\_Prof](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Steampunk\_Prof](https://discourse.nodered.org/u/Steampunk_Prof)\
**Post date:** [21 October 2019 23:05 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/9 "2019-10-21T23:05:53Z")

</div>

Hi, I put a Node-RED wrapper around the mode module node-usb-barcode-scanner. It works well enough for me to get the price of things from the UK Tesco supermarket API. You may need to set up a udev rule for it.

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [21 October 2019 23:19 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/10 "2019-10-21T23:19:09Z")

</div>

Hi prof, do we have tutorials on how to implement it? I'm kinda new in Nodered. Thanks alot!

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [22 October 2019 12:50 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/11 "2019-10-22T12:50:21Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/29eff9ac6b778c66d591745dedc7f63ec4837e3f.png)

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [22 October 2019 14:04 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/12 "2019-10-22T14:04:16Z")

</div>

Hello My friend! 🙂 yes I did it awhile ago and it's working ! Thanks for your time. 🙂

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [7 February 2020 12:54 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/13 "2020-02-07T12:54:29Z")

</div>

Hello, everyone, I followed your answer as above,

But for me, it is not working,

I have USB barcode scanner with RPI 3b+

- I used Text Input widget but it is not working(I don't know how it should configure with the USB barcode reader).

Any thing to add on it?

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [7 February 2020 13:39 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/14 "2020-02-07T13:39:51Z")

</div>

You can test the barcode first in Excel. Try to click one of the cells in Excel, and try to Scan in Barcode, it should give you the value of the scanned code, and the active cells should be below that value (its like hitting Return in kryboard)

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [7 February 2020 15:48 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/15 "2020-02-07T15:48:25Z")

</div>

I don't know why you have suggested this which is off the topic not related to RPI nodered!!

It is writing values in Text file of RPI os.

How can i get values in node red?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 February 2020 16:25 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/16 "2020-02-07T16:25:30Z")

</div>

> [@pranavthakkar](#):
>
> It is writing values in Text file of RPI os.

How do you make it write to a file?

---

<div class="post-metadata">

**Author:** ![Kenmazing](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@Kenmazing](https://discourse.nodered.org/u/Kenmazing)\
**Post date:** [7 February 2020 16:50 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/17 "2020-02-07T16:50:18Z")

</div>

One would use this to make sure that the scanner is actually outputting something over HID USB. Definitely on-topic since it would be used to make sure you that you aren't being tricked by a scanner that is sending nothing.

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [8 February 2020 05:34 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/18 "2020-02-08T05:34:09Z")

</div>

I don't know, when I open text editor and scan barcode it will write on text editor,

So what should i do to use in node red?

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [8 February 2020 05:35 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/19 "2020-02-08T05:35:07Z")

</div>

it is working on text editor , But what will the procedure for nodered to read the scanner output?

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [8 February 2020 09:33 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/20 "2020-02-08T09:33:07Z")

</div>

Put a text input to your dashboard.

[Next page](https://discourse.nodered.org/t/barcode-scanner-input/16905.md?page=2)
