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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Nico teWinkel's Blog Arduino Uno R4 WiFi - Receiving Commands Via BLE
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ntewinkel
  • Date Created: 5 Aug 2023 7:05 PM Date Created
  • Views 15083 views
  • Likes 9 likes
  • Comments 0 comments
  • bluetooth
  • ble
  • Arduino R4 Wifi
Related
Recommended

Arduino Uno R4 WiFi - Receiving Commands Via BLE

ntewinkel
ntewinkel
5 Aug 2023
Arduino Uno R4 WiFi - Receiving Commands Via BLE

The Arduino Uno R4 WiFi has an ESP32 WiFi module on it, which includes Bluetooth (BLE).

When it was first released, the BLE part was not yet implemented, but you can upgrade the firmware on your Arduino Uno R4 WiFi board that enables it. Judging by the version number starting with 0.x, I'm guessing it's still in a beta/development mode.
Here is the URL that explains how to update it: https://forum.arduino.cc/t/radio-module-firmware-version-0-2-0-is-now-available/1147361

Note that the above is a blog post, so if you're reading this in the future, there will likely be a newer version, or you might already have it activated on your board.

After I updated the firmware and installed the beta version of the ArduinoBLE library, I read through and tried a few examples for the BLE functions, and then put together a small sketch.

My goal is to use the Arduino Uno R4 WiFi to control a little robot car platform that's been sitting unused in my office for far too many years already.
To that end, the sketch will be receiving some basic commands that I will ultimately use to control the car. It essentially matches the images I created for the LED matrix in a previous blog post - I'll eventually make it display the commands on that LED matrix as a way to verify what it's doing.

There are a couple of ways to use Bluetooth to communicate with an Arduino board. One common method is to just make it a serial connection and then send and receive commands via that serial interface. The other way is to set it up as a proper Bluetooth device and use characteristics to share information.

I decided to try the BLE device method. I'm not sure if there's any advantage to that or not, but there are enough examples so it's not really any more difficult to use.

And of course, you'll need something on "the other side" of that BLE connection. Luckily, there's an app for that. The examples recommended LightBlue for iOS, so I used that to get started. I'll probably write a little control app for it eventually, unless I can find an app that's already done that work for me.

And here is the result after testing:

Arduino BLE Serial console

Haha, oops - that "failed!" message above was while I testing the rapid blinking of the LED that indicates failure. It never actually failed at all during real use.

In the app I basically just sent the numbers 00 through 04, using that little "write new value" link.
You can then press on the entry it creates to send it again so you don't always need to re-type the numbers.

LightBlue BLE testing app

Here is the Arduino source file, if you want to try it out:

r4_BLE_ButtonLED.ino.zip

For a full list of arduino products visit one of our online stores.

  • 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