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
Vertical Farming
  • Challenges & Projects
  • Design Challenges
  • Vertical Farming
  • More
  • Cancel
Vertical Farming
Blog Conclusion
  • 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: Former Member
  • Date Created: 1 Dec 2015 3:47 AM Date Created
  • Views 765 views
  • Likes 1 like
  • Comments 1 comment
  • vertical_farming
Related
Recommended

Conclusion

Former Member
Former Member
1 Dec 2015

So I suppose this blog post is very belated; however, I wished to sum up the events of the past few weeks and the total sum of the programming completed. Basically, I got stuck on the programming of the EZR32WG MCU. I tried to look through James's code, but even after looking at his use of arrays, I couldn't do anything with the data because I lacked any way to express the information. Therefore, I went to the TemHumidity example in Simplicity Studio and tried to use a similar graphics. Upon writing this, I see two logical flaws in this attempt: there is no space on the LCD and the obstacle which I encountered, namely transposing the values read from the radio into displayed strings. I am unsure if I am allowed to do this.... but I will look for possible solutions for this throughout the week. Basically, the problems I encountered were a: getting data from the arduino to the emitted packets.(I wasn't sure how to put the information into them.... the example code showed how to send packets but not how to store information in them except for the ACK, which did not apply). I2C attempts failed because it proved to be too difficult to integrate it with the EZR32. I was then forced to use Rx/Tx, something I was not used to with an arduino. I figured out from online sources how to send 1 byte at a time, but for the multiple sensors, I did not know how to separate them for the micro controller to read. I will attach my code for the arduino(my small adjustments to EZR32 examples are not very needed). The program is pretty straight forward, and at the end you can see my attempts to send the sensor values to the EZR32. If anyone could explain to me how to send the information into the packets.... it would be much appreciated, and I could perhaps finish up with a bare bones result: the sensors included in the arduino code/a motorized feeding system/a hopefully functional water circulation system(I'm currently using a pump and a siphon made of tubing with a servo jiggling the tube to get the water flow started/and a display made by the EZR32.

*Edit: In the code, it talks about an output on pin 10 with a timer function. This is a motor.

Attachments:
Fish_sensors.ino.zip
  • Sign in to reply
  • jamesod
    jamesod over 9 years ago

    If you look at the txrx sample code provided in the simplicity studio examples, you have to put the data you want to transfer into the radioTxPkt array. This array contains the length of the data as the first element and then (i think) 8 bytes for data by default. In my code I then assign the data using this loop:

    z = 0;
          //Get serial data for radio xfer from serial rxBuffer
          while (SerialReady()){
        if(z == 0){
        appTxPktCntr++;
        printf("<-Data TX: ");
        }
        serial_data = SerialRadioData();
        *(uint8_t *)(radioTxPkt + APP_PKT_DATA_START + z) = serial_data;
        printf("%c", serial_data);
        z++;
    
    
          }
          if (z > 0){
         *(uint8_t *)(radioTxPkt + APP_PKT_DATA_START + z) = 126;
         printf("\n");
          }

    This transfers the serial data byte by byte into the radioTxPkt array. You can do this with any byte (uint8_t) or array of bytes.

    If you look at my arduino code and the serialcomms files in my project you can see an example of using the UART (tx/rx) connection between the Arduino and the EZR32WG.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
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