Giter VIP home page Giter VIP logo

arduino_mega_hm_10_ble's Introduction

Arduino Mega & HM-10 Bluetooth Module

About

Maybe this will help someone struggling with setting up Arduino Mega2560 with HM-10 Bluetooth module.

I bought my Bluetooth module from Amazon and apparently it seems to be 'clone' even though it has the Texas Instruments CC2541 chip, which is used in the original module from Jinan Huamaoand(?). I did not have to upload original firmware to get this module to work.

I started experiment with 4ntoine mega-to-hm10 repository to setup the connection.

Unfortunately pins TX14 & RX15 or TX18 & RX19 did not work for me.

Had the same issue like many others have had with AT commands not working in serial mode.

Arduino documentation

It seems some documentation is inconclusive within Arduino website about RX pins?

Within SoftwareSerial library documentation it is stated:

  • Not all pins on the Mega and Mega 2560 boards support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). Not all pins on the Leonardo and Micro boards support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

And within SoftwareSerialExample it is stated:

  • Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

My solution

HM-10 Arduino Mega
GND GND
TXD PIN 10
RXD PIN 14

My solution was to use pin 10 for RX. I assume that pind 11, 12 and 13 would work also.

Example code for testing serial mode and AT commands can be found within at.ino file.

AT example

Disclosure

I am beginner with Arduino. Hence, it is possible that due to my own mistake I did not get RX to work with other pins, eg. 15 or 19 in the beginning.

arduino_mega_hm_10_ble's People

Contributors

j-tapio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.