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
Arduino
  • Products
  • More
Arduino
Arduino Forum wireless display
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 14 replies
  • Answers 2 answers
  • Subscribers 393 subscribers
  • Views 856 views
  • Users 0 members are here
  • led
  • arduino
Related

wireless display

billpenner
billpenner over 11 years ago


I am attempting to build a keypad decoder, a wireless transmitter, a receiver and a 3inch LED display.

The decoder is working but I am having trouble determining what type data to transmit ie. character, byte or integer.

Since I will have to decode the data at the receiver, what would be the best type to use?

The initial code is;

 

#include <Keypad.h>

const byte ROWS = 4; // Four rows
const byte COLS = 3; // Three columns
// Define the Keymap
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'#','0','*'}
};

byte rowPins[ROWS] = { 9, 8, 7, 6 }; // keypad rows to Arduino pins

byte colPins[COLS] = { 12, 11, 10 }; //keypad columns to Arduino pins

// Create the Keypad
Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

#define ledpin 13 //define output pin to xmitter

void setup()
{
  
  pinMode(ledpin,OUTPUT);  //for testing
  digitalWrite(ledpin, HIGH); //for testing
  Serial.begin(9600);
}

void loop()
{
   //for (int(c); c <2; c++); I would like to accumulate three bytes and transmit together if possible
   char key = kpd.getKey();
  if(key)  // Check for a valid key.
  {
    switch (key)
    {
      case '#':     //Clear data for re-entry
        digitalWrite(ledpin, HIGH); // for testing
        break;                      // for testing
      case '*':     // Display data on receiver
        digitalWrite(ledpin, LOW);  // for testing
        break;                      // for testing
    
      default:    //send data to xmitter     not working! It only sends to! computer display. 
        Serial.println(key);      // for testing
       

     }
  }  
}

All help would be greatly appreciated. This is a project for our church.

Thanks

Bill

  • Sign in to reply
  • Cancel
Parents
  • Robert Peter Oakes
    0 Robert Peter Oakes over 11 years ago

    If you look at lesson 2 of my tutorials, it deals with reading a character at a time from the serial port into a buffer, a later lesson deals with doing the same from the Ethernet port. The serial port version can easily be adapted to read from the keyboard instead, it then goes on to deal with how to make decisions based on what is read

     

    you can find it here Fast Track to Arduino Programming

     

    the key part in this lesson in your case is replacing the serial.read() with your getkey() and also reducing the buffer size to 3 which you state is your requirements.

     

    You may want to start from lesson 0 though if your not familiar with programming the arduino

     

    If this is still to complicated right now, let me know and I can simplify the relevant parts of the program for you

     

    Regards

     

    peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • billpenner
    0 billpenner over 11 years ago in reply to Robert Peter Oakes

    Thank you very much. I am progressing very slowly but I am learning much in the process.

    I am sure I am making it far to complex, but as I say am learning much.

    It sounds simple to read a keyboard, display the 3 digit number  and send the number wirelessly to a receiver and display it there on a large LED display.

    Although I am proficient with hardware and electronic circuitry, I am inexperienced with programming.

    I have the keyboard decoding and reading. I have the local display working somewhat. I am working on the translation to drive the transmitter now.

    I am also  cleaning up some of my mistakes. I don't have enough time to devote to the project as I would like but I am enjoying it immensely.

    Thanks to all for your input and help.

    Bill

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • kidiccurus
    0 kidiccurus over 11 years ago in reply to billpenner

    Hang on, what wireless system are you using? did I I miss something. Also, if possible, just use wires. I know wireless is cool but it is a nightmare to get to work properly.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 11 years ago in reply to billpenner

    As far as sending int's characters etc, you can define message format using a "structure" and using a "Union" to join multiple structures so you can choose what you send and when

     

    if the radio will only take char type then define a structure like that too and cast to it when you transmit

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • billpenner
    0 billpenner over 11 years ago in reply to kidiccurus

    I have about 120 ft. to the display and no way to use wire. You are correct, I wish I could use wire. I have some NRF 24L01 but I am not locked in.

    easier systems are welcome. However Bluetooth is out because of the distance.

    Thanks for your reply.

    Bill

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • billpenner
    0 billpenner over 11 years ago in reply to kidiccurus

    I have about 120 ft. to the display and no way to use wire. You are correct, I wish I could use wire. I have some NRF 24L01 but I am not locked in.

    easier systems are welcome. However Bluetooth is out because of the distance.

    Thanks for your reply.

    Bill

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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