Menu
Microbots
0
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • Modules & Parts
    • Tools & Gears
    • Robots & Displays
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Sign in
  • English
  • Your Cart is Empty
Microbots
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • Modules & Parts
    • Tools & Gears
    • Robots & Displays
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Language

  • 0 0

CodeCell: Set Up a GPIO in Seconds

The CodeCell module makes working with GPIO (Input/Output) pins simpler than ever. While you can still use the traditional Arduino digitalWrite() and digitalRead() functions, CodeCell library uses the pinWrite() and pinRead(), which automatically handle pin initialization for you.

No Pin Initialization

With CodeCell's optimized functions, you don’t need to manually set the pin mode using pinMode(). Just call:

myCodeCell.pinWrite(uint8_t pin_num, bool pin_value);

For example, to turn on an LED connected to pin 5:

myCodeCell.pinWrite(5, HIGH);

Or turn it off:

myCodeCell.pinWrite(5, LOW);

Reading GPIO States

Reading a pin state is just as simple:

if (myCodeCell.pinRead(5)) {
    // Pin is HIGH, do something
}

The pinRead() function returns a boolean (true for HIGH, false for LOW), making GPIO interactions effortless.

Why Use These Functions?

  • No need for pinMode()—it’s handled automatically, making your sketches cleaner.

  • Built-in error detection—if a pin is not available on your CodeCell module, it will issue an error on the Serial Monitor, helping you debug the problem.

These functions make CodeCell's GPIO management easier to use, when controlling LEDs, buttons, and more!

 

  • Share:

Follow

Github

  • About
  • Software
  • Education
  • Contact
  • FAQs
  • Terms
  • Refund Policy
  • Privacy Policy

Join our Community ~ Be the first to know about new products and get exciting deals!

© 2026 Microbots.

★ Reviews

Let customers speak for us

41 reviews
Write a review
80%
(33)
5%
(2)
2%
(1)
5%
(2)
7%
(3)
21
37
A
CodeCell C6
Anonymous

Love it

L
CoilCell
Laszlo Hasenau

Nice to have the drivers integrated, sufficient for very small units, where low force needed.

User picture
L
CodeCell C6 Drive
Leon

Love this thing! The coding for controlling the integrated drivers is extremely intuitive, the chip is fast as always and all the other sensors work like a charm. If there were 6 stars id give all of em but theres only 5 XD

A
CodeCell C6 Drive
Anonymous

Pequeno e esperto. TEM projetos com câmera 📷🎥?
DVR PARA MOTO 🛵?

A
CodeCell C3
Anonymous

Busy developing something that has been a very popular topic in the maker space. Once complete I will share it all with you including the coding.I am really impressed with the punch this little C3 packs. Really a great piece of engineering. Keep up the brilliant work and thank you for making this little giant!!!!!!

123