Project tutorial

Radio Hello World

Easy 'Hello World' with an RF 433MHz transmitter/receiver module and Arduino.

  • 26 views
  • 0 comments
  • 2 respects

Components and supplies

Apps and online services

About this project

Radio Hello World

Hello World message between two Arduino boards via an RF443MHz transmitter / receiver module.

Code

Receiver CodeArduino
//RECEIVER

// RadioHead - Version: Latest 
#include <RH_ASK.h>
// SPI - Version: Latest
// Not actualy used but needed to compile 
#include <SPI.h>

RH_ASK driver; 

void setup()
{
    Serial.begin(9600);
    if (!driver.init())
         Serial.println("init failed");
}

void loop()
{
    uint8_t buf[12];
    uint8_t buflen = sizeof(buf);
    if (driver.recv(buf, &buflen))
    {
      int i;
      Serial.print("Message: ");
      Serial.println((char*)buf);         
    }
}
Transmitter CodeArduino
//TRANSMITTER

// RadioHead - Version: Latest 
#include <RH_ASK.h>
// SPI - Version: Latest
// Not actualy used but needed to compile 
#include <SPI.h>

RH_ASK driver; 

void setup()
{
    Serial.begin(9600);
    if (!driver.init())
         Serial.println("init failed");
}

void loop()
{
    const char *msg = "Hello World!";
    driver.send((uint8_t *)msg, strlen(msg));
    driver.waitPacketSent();
    delay(1000);
}

Schematics

Fritzing Mounting Plate
Fritzing plate pdzmxxgf0u

Comments

Similar projects you might like

Arduino Bluetooth Basic Tutorial

by Mayoogh Girish

  • 454,652 views
  • 42 comments
  • 236 respects

Home Automation Using Raspberry Pi 2 And Windows 10 IoT

Project tutorial by Anurag S. Vasanwala

  • 285,540 views
  • 95 comments
  • 672 respects

Security Access Using RFID Reader

by Aritro Mukherjee

  • 229,556 views
  • 38 comments
  • 238 respects

OpenCat

Project in progress by Team Petoi

  • 196,134 views
  • 154 comments
  • 1,363 respects
Add projectSign up / Login