# Send bytes thrugh the digital pins

**URL:** <https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582>\
**Category:** Uncategorized\
**Created:** [December 20, 2018, 8:30am UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582 "2018-12-20T08:30:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kolanzev](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@kolanzev](https://forum.xod.io/u/kolanzev)\
**Post date:** [December 20, 2018, 8:30am UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/1 "2018-12-20T08:30:44Z")

</div>

Do not throw slippers, I’m noob.  
I’m tryng to find similar node like “digitalWrite” in Arduino IDE.

Now i find only i2c and UART nodes, but this does not fit.

I want to learn to control 7segments displays with 74hc595, but without arduino IDE.

Please dont send me to google, just ignore, if you dont want to help.

---

<div class="post-metadata">

**Author:** ![bradzilla84](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/bradzilla84/32/659_2.png) [@bradzilla84](https://forum.xod.io/u/bradzilla84)\
**Post date:** [December 20, 2018, 11:29am UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/2 "2018-12-20T11:29:23Z")

</div>

Hi kolanzev

I have already written a library for just this 😄

Install in XOD and you are good to go.  
[bradzilla84/74hc595](https://xod.io/libs/bradzilla84/74hc595/)

not sure how to install?  
[https://xod.io/docs/guide/using-libraries/](https://xod.io/docs/guide/using-libraries/)

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [December 20, 2018, 12:47pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/3 "2018-12-20T12:47:05Z")

</div>

> [@kolanzev](#):
>
> I’m tryng to find similar node like “digitalWrite” in Arduino IDE.

Hi, in XOD/GPIO it `digital-read`, `digital-write` , `analog-read` and `analog-write`

---

<div class="post-metadata">

**Author:** ![kolanzev](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@kolanzev](https://forum.xod.io/u/kolanzev)\
**Post date:** [December 20, 2018, 6:28pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/4 "2018-12-20T18:28:49Z")

</div>

Greate tanx for anwers, learning bradzilla84/74hc595.

---

<div class="post-metadata">

**Author:** ![kolanzev](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@kolanzev](https://forum.xod.io/u/kolanzev)\
**Post date:** [December 20, 2018, 7:50pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/5 "2018-12-20T19:50:18Z")

</div>

Hi again, it does not work, i crash all my brain.

" Checking Arduino dependencies… Library “ShiftRegister74HC595” is missing  
Arduino dependencies missing You have to install these libraries first: “ShiftRegister74HC595"”

Through “File/add library” library does not setup, “Simsso/ShiftRegister74HC595”, library not found.

---

<div class="post-metadata">

**Author:** ![bradzilla84](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/bradzilla84/32/659_2.png) [@bradzilla84](https://forum.xod.io/u/bradzilla84)\
**Post date:** [December 21, 2018, 4:51am UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/6 "2018-12-21T04:51:05Z")

</div>

Yep when that message comes up there should be a button in the bottom right hand corner for install xod will take care of the rest for you. 🙂

---

<div class="post-metadata">

**Author:** ![kolanzev](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@kolanzev](https://forum.xod.io/u/kolanzev)\
**Post date:** [December 21, 2018, 9:42am UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/7 "2018-12-21T09:42:29Z")

</div>

Ow… Yes, it starts working, but my program does not work.  
I tryng for first time set random sequence in node hc-595-pack, but 7-segment dysplay segments are all OFF, or all ON, what bit or sequence or bits it do i dont know.  
That is my program:  
 ![00](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/b9d80c11d6a1db0223cce53b397424b25b061a5d.png)

Dysplay connection is correct, because this code works az it must:

```auto
int latchPin = 2; //pin 12 on the 595
int dataPin = 3; //pin 14 on the 595
int clockPin = 4; //pin 11 on the 595

void setup() {
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
}

void loop() {
  
  //0
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 64);
  digitalWrite(latchPin, HIGH);
  delay(1000);

  //1
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 121);
  digitalWrite(latchPin, HIGH);
  delay(1000);
  
  //2
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 36);
  digitalWrite(latchPin, HIGH);
  delay(1000);

  //3
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 48);
  digitalWrite(latchPin, HIGH);
  delay(1000);
  
  //4
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 25);
  digitalWrite(latchPin, HIGH);
  delay(1000);  
  
  //5
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 18);
  digitalWrite(latchPin, HIGH);
  delay(1000);

  //6
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 2);
  digitalWrite(latchPin, HIGH);
  delay(1000);

  //7
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 120);
  digitalWrite(latchPin, HIGH);
  delay(1000);

  //8
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 0);
  digitalWrite(latchPin, HIGH);
  delay(1000);

  //9
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 24);
  digitalWrite(latchPin, HIGH);
  delay(1000);
}

```

Can you please make little tutorial for your library?  
Or any examples of realy working structure of nods for 1 dysplay, 2 dysplays, matrix 8x8, with a few shift registers?  
I am sure it will be useful not only for me.

---

<div class="post-metadata">

**Author:** ![bradzilla84](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/bradzilla84/32/659_2.png) [@bradzilla84](https://forum.xod.io/u/bradzilla84)\
**Post date:** [December 21, 2018, 10:17am UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/8 "2018-12-21T10:17:53Z")

</div>

I don’t personally have one of these chips to test myself, it was proofed and requested by another user

> [@\[I want a node\] HC595 Serial to Parallel Shifting-Out](https://forum.xod.io/t/hc595-serial-to-parallel-shifting-out/1422/12):
>
> No problem…Done. Ver 0.0.3

Maybe [cesars](https://forum.xod.io/u/cesars) can help with its use?  
let me know if you find a problem more than happy to fix.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [December 21, 2018, 2:15pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/9 "2018-12-21T14:15:04Z")

</div>

> [@bradzilla84](#):
>
> Maybe [cesars](https://forum.xod.io/u/cesars) can help with its use?

🤔

> [@kolanzev](#):
>
> Can you please make little tutorial for your library?

[hc595-example .xodball](https://forum.xod.io/uploads/xod/original/1X/a5929174844a5bfa245aaa9eb0e0a342d249ee04.xodball) (45.6 KB) fix

 ![hc595-example](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/bc18186d53c21fab20a5b676cb9a1e9767a5337c.png)  
 ![sequence](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/041aa2a7b89ca1fc1fc23a34706ff1cdfc827214.png)

---

<div class="post-metadata">

**Author:** ![bradzilla84](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/bradzilla84/32/659_2.png) [@bradzilla84](https://forum.xod.io/u/bradzilla84)\
**Post date:** [December 21, 2018, 2:36pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/10 "2018-12-21T14:36:06Z")

</div>

Wow Verry nice Cesars 😊 do you mind if I include this in the library? (with appropriate citation of course)

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [December 21, 2018, 2:37pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/11 "2018-12-21T14:37:42Z")

</div>

No problem, check fix if there is error 😉

---

<div class="post-metadata">

**Author:** ![kolanzev](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@kolanzev](https://forum.xod.io/u/kolanzev)\
**Post date:** [December 22, 2018, 8:10pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/12 "2018-12-22T20:10:54Z")

</div>

This all is for week of learning.  
Trying to repeat 2-th scheme, in the latest version XOD there are problems(  
For example i dont know, what is node with “T” letter, guess it must be constant-number now.  
“En” - guess constant-boolean.  
To “EN” connector of square-wave may connect only one node now.  
Think in latest version its unrepeated.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [December 22, 2018, 9:29pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/13 "2018-12-22T21:29:07Z")

</div>

> [@kolanzev](#):
>
> what is node with “T” letter, guess it must be constant-number now

`T` is time puse, 1= 1sec , 2=2sec, 0.5=1/2sec

> [@kolanzev](#):
>
> o “EN” connector of square-wave may connect only one node now.

the inputs can only have one connection, the outputs can instead be connected to several pins

you download 👇 ?

> [@cesars](#):
>
> [hc595-example .xodball](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/a5929174844a5bfa245aaa9eb0e0a342d249ee04.xodball) (45.6 KB) fix

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [December 22, 2018, 9:40pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/14 "2018-12-22T21:40:07Z")

</div>

if you want to create another sequence equal or similar below, create a new patch (rename to sequence2) copy all `sequence` content and paste in `sequence2`, then add the `new node` to the `main`

---

<div class="post-metadata">

**Author:** ![sc-v](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@sc-v](https://forum.xod.io/u/sc-v)\
**Post date:** [December 27, 2019, 6:05pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/15 "2019-12-27T18:05:47Z")

</div>

Hi there!  
Somehow the Compailer in version 0.32.1 always issues an error. Even if I set it up exactly the same as in the pictures above. Even with a simple circuit like this:

 ![aufbau_1](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/6/600e0db258acc45d275279b12ff904726713fb27.jpeg)

With this Errormessage:  
" Compilation failed Command Process exited with code 1 The generated C++ code contains errors. It can be due to a bad node implementation or if your board is not compatible with XOD runtime code. The original compiler error message is above. Fix C++ errors to continue. If you believe it is a bug, report the problem to XOD developers."

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [December 27, 2019, 7:12pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/16 "2019-12-27T19:12:30Z")

</div>

This is just saying there was an error. You need to scroll up to see what the actual error was.

---

<div class="post-metadata">

**Author:** ![sc-v](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@sc-v](https://forum.xod.io/u/sc-v)\
**Post date:** [December 27, 2019, 8:31pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/17 "2019-12-27T20:31:37Z")

</div>

Here it is 😉  
" Compiling sketch…

“C:\Users\Computer\xod\ **packages** \packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF\_CPU=16000000L -DARDUINO=10607 -DARDUINO\_AVR\_UNO -DARDUINO\_ARCH\_AVR “-IC:\Users\Computer\xod\ **packages** \packages\arduino\hardware\avr\1.8.2\cores\arduino” “-IC:\Users\Computer\xod\ **packages** \packages\arduino\hardware\avr\1.8.2\variants\standard” “-IC:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\libraries\ShiftRegister74HC595\src” “C:\Users\Computer\AppData\Local\Temp\arduino-sketch-CEFCCC8FE7EB4E2E114A4AEA730E7EC5\sketch\xod\_1577478627039\_sketch.ino.cpp” -o “C:\Users\Computer\AppData\Local\Temp\arduino-sketch-CEFCCC8FE7EB4E2E114A4AEA730E7EC5\sketch\xod\_1577478627039\_sketch.ino.cpp.o”

C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:973:44: error: missing template arguments before ‘)’ token  
uint8\_t mem[sizeof(ShiftRegister74HC595)];  
^  
C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:977:14: error: invalid use of template-name ‘ShiftRegister74HC595’ without an argument list  
using Type = ShiftRegister74HC595\*;  
^ ~~~~~~~~~~~~~~~~~~~  
C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:977:14: note: class template argument deduction is only available with -std=c++1z or -std=gnu++1z

In file included from C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:967:0:  
C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\libraries\ShiftRegister74HC595\src/ShiftRegister74HC595.h:13:7: note: ‘template class ShiftRegister74HC595’ declared here  
class ShiftRegister74HC595  
^ ~~~~~~~~~~~~~~~~~~~  
C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:980:41: error: ‘Type’ in namespace ‘xod::bradzilla84\_\_74hc595\_\_hc595\_device’ does not name a type  
bradzilla84\_\_74hc595\_\_hc595\_device::Type output\_DEV;  
^~~~

C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:995:89: error: ‘Type’ in namespace ‘xod::bradzilla84\_\_74hc595\_\_hc595\_device’ does not name a type  
template\<\> struct ValueType\<output\_DEV\> { using T = bradzilla84\_\_74hc595\_\_hc595\_device::Type; };  
^~~~

C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:1029:48: error: ‘Type’ in namespace ‘xod::bradzilla84\_\_74hc595\_\_hc595\_device’ does not name a type  
template\<\> bradzilla84\_\_74hc595\_\_hc595\_device::Type getValue\<output\_DEV\>(Context ctx) {  
^~~~  
C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:1988:20: error: ‘struct xod::bradzilla84\_\_74hc595\_\_hc595\_clear::ContextObject’ has no member named ‘\_input\_DEV’; did you mean ‘\_input\_CLR’?  
ctxObj.\_input\_DEV = node\_19.output\_OUT;  
^ ~~~~~~~~~  
\_input\_CLR  
C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\xod\_1577478627039\_sketch\xod\_1577478627039\_sketch.ino:1988:41: error: ‘struct xod::bradzilla84\_\_74hc595\_\_hc595\_set::Node’ has no member named ‘output\_OUT’; did you mean ‘output\_DONE’?  
ctxObj.\_input\_DEV = node\_19.output\_OUT;  
^ ~~~~~~~~~  
output\_DONE

Multiple libraries were found for “ShiftRegister74HC595.h”  
Used: C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\libraries\ShiftRegister74HC595

Using library ShiftRegister74HC595 at version 1.3.1 in folder: C:\Users\Computer\AppData\Local\Temp\xod\_temp\_sketchbookkoulHT\libraries\ShiftRegister74HC595

Error: exit status 1  
Compilation failed. "

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [December 27, 2019, 10:51pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/18 "2019-12-27T22:51:06Z")

</div>

the repository of the github library has changed. I have uploaded a previous original repository, open “hc595dev” and edit the github address … change “Simsso” x “Cesar-S”

try again

ps: before deleting the directory ShiftRehister74HC595 in …“user”/xod/\_\_ ardulib \_\_

---

<div class="post-metadata">

**Author:** ![sc-v](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@sc-v](https://forum.xod.io/u/sc-v)\
**Post date:** [December 28, 2019, 12:17am UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/19 "2019-12-28T00:17:21Z")

</div>

Thank You, it works! 🙂

---

<div class="post-metadata">

**Author:** ![banovsha-isgandarova](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@banovsha-isgandarova](https://forum.xod.io/u/banovsha-isgandarova)\
**Post date:** [March 12, 2021, 2:10pm UTC](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582/20 "2021-03-12T14:10:16Z")

</div>

I have met with the same issue  
How can I modify block?  
Please kindly help me to work with shift registers in right way with xod

[Next page](https://forum.xod.io/t/send-bytes-thrugh-the-digital-pins/1582.md?page=2)
