element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
1 Meter of Pi
  • Challenges & Projects
  • Design Challenges
  • 1 Meter of Pi
  • More
  • Cancel
1 Meter of Pi
Blog Gr0G - 07 - Playing with the Gertbot
  • 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: amgalbu
  • Date Created: 4 Nov 2020 7:05 AM Date Created
  • Views 373 views
  • Likes 3 likes
  • Comments 0 comments
  • 1meterofpi
  • gr0g
  • 1meter of pi
Related
Recommended

Gr0G - 07 - Playing with the Gertbot

amgalbu
amgalbu
4 Nov 2020

Here is a list of the posts in this challenge

Gr0G - 01 - Introduction

Gr0G - 02 - Why aeroponics?

Gr0G - 03 - High-pressure system design

Gr0G - 04 - Mechanical design

Gr0G - 05 - Electrical design

Gr0G - 06 - Building the box

Gr0G - 07 - Playing with the Gertbot

Gr0G - 08 - Installing LEDs

Gr0G - 09 - The control board

Gr0G - 10 - Software design

Gr0G - 11 - Building the box (2)

Gr0G - 12 - Building the high-pressure system

Gr0G - 13 - Building the high-pressure system (2)

Gr0G - 14 - Piping

Gr0G - 15 - Improvements

Gr0G - 16 - Remote UI

Gr0G - 17 - Remote UI (2)

Gr0G - 18 - Conclusions

 

Source code available at https://github.com/ambrogio-galbusera/gr0g, https://github.com/ambrogio-galbusera/gr0g-ble-android and https://github.com/ambrogio-galbusera/gr0g-ble

 

In this post I will start to play a little bit with the Gertbot board

 

Preliminary operations

Besides the "typical" tasks you have to work out when you boot a Rapsberry Pi for the first time (like, for example, expanding the filesystem, updating software components etcetera), there are a couple of other things to make the Gertbot board work properly

Disable serial console and enable UART

The internal serial console must be disabled to free the serial port for the Gertbot (as a matter of fact, Raspberry Pi communicates with the Gertbot board using the UART0, which is typically used as a Linux serial console).

By default the serial port on the Raspberry PI is configured for console input/output

To disable Linux serial console and enable UART, you have two options. The second option is actually less straightforward, but I like to understand what happens behind to scene and maybe someone could be interested as well

  • run raspi-config, navigate to Interfacing options, then Serial.

     image

          When asked if you want to be able to access from a serial console, select No, When asked if you want to enable serial hardware, click Yes

OR

  • Open /boot/cmdline.txt and edit it to disable boot info being sent to the port.

 

sudo nano /boot/cmdline.txt

 

         Remove the following string from the kernel command line

console=serial0,115200

 

         Save the file with CTRL-O and CTRL-X to exit nano.

         Edit file /boot/ config.txt

sudo nano /boot/config.txt

 

         and append a new line  at the end of the file

enable_uart=1

 

         Save the file with CTRL-O and CTRL-X to exit nano.

 

Disable Bluetooth

Bluetooth may use UART port, so it's a good idea to disable it completely. To accomplish this, edit /boot/config.txt

     sudo nano /boot/config.txt

 

and append

     dtoverlay=pi3-disable-bt

 

Reboot the board

sudo reboot

 

to apply the changes

 

First application

I created a simple application to test PWM output. I connected a 12 Volt power supply and a fan

image

 

image

 

Then I downloaded the Python library from

https://www.gertbot.com/gbdownload/rev2.8/python_code.tgz

and untared the file

tar xzvf python_code.tgz

 

There are many samples included in the tgz file, but I will create a very simple application to get familiar with the library itself

I created a new folder for my application, and here I copied file gertbot.py from the folder where the library archive was extracted. Finally, I created a simple application

In this application, I simply

  • initialize the output

          gb.set_mode(board,channel,gb.MODE_BRUSH)
          gb.move_brushed(board,channel,gb.MOVE_B)

 

  • set the PWM frequency and the duty cycle to vary fan speed

          gb.pwm_brushed(board,channel,freq,dc)

 

  • switch off the PWM

          gb.set_mode(board,channel,gb.MODE_OFF)

 

Here is the result (I hope the fan speed is visible in the video)

 

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

 

Hooray! Another step in this challenge!

As soon as my local warehouse will have a 1/4 inch female Tee available, I will start testing the compressor and the atomizer. In case of delays, I will make the final touches to the box or install the LED

 

BTW, I created a github repository where I will push all the source code I will develop for this challenge. The repo is here

https://github.com/ambrogio-galbusera/gr0g

  • Sign in to reply
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