{"id":3336,"date":"2023-02-04T06:06:11","date_gmt":"2023-02-04T14:06:11","guid":{"rendered":"https:\/\/www.donluc.com\/?p=3336"},"modified":"2023-02-04T06:22:12","modified_gmt":"2023-02-04T14:22:12","slug":"project-26-radio-frequency-display-mk05","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=3336","title":{"rendered":"Project #26 &#8211; Radio Frequency &#8211; Display &#8211; Mk05"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-3336-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #RadioFrequency #Moteino #Send #Receive #Display #FreeIMU #Magnetometer #Accelerometer #Gyroscope #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09a.png\" alt=\"Display\" width=\"720\" height=\"518\" class=\"alignnone size-full wp-image-3338\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09a-300x216.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09b.png\" alt=\"Display\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-3339\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09b-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09c.png\" alt=\"Display\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-3340\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/02\/DL2211Mk09c-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>SparkFun Micro OLED Breakout<\/strong><\/p>\n<p>The SparkFun Qwiic Micro OLED Breakout is a Qwiic-enabled version of our popular Micro OLED display. The small monochrome, blue-on-black OLED screen presents incredibly clear images for your viewing pleasure. It\u2019s the OLED display is crisp, and you can fit a deceivingly large amount of graphics on there. This breakout is perfect for adding graphics to your next project and displaying diagnostic information without resorting to a serial output, all with the ease of use of our own Qwiic Connect System.<\/p>\n<p>This version of the Micro OLED Breakout is exactly the size of its non-Qwiic sibling, featuring a screen that is 64 pixels wide and 48 pixels tall and measuring 0.66&#8243; across. But it has also been equipped with two Qwiic connectors, making it ideal for I2C operations. We&#8217;ve also added two mounting holes and a convenient Qwiic cable holder incorporated into a detachable tab on the board that can be easily removed thanks to a v-scored edge.<\/p>\n<p><strong>DL2211Mk09<\/strong><\/p>\n<p>2 x Moteino R2 (RFM12B)<br \/>\n1 x SparkFun Micro OLED Breakout (Qwiic)<br \/>\n1 x SparkFun 9 Degrees of Freedom &#8211; Sensor Stick<br \/>\n2 x Lithium Ion Battery &#8211; 1 Ah<br \/>\n1 x SparkFun Cerberus USB Cable<\/p>\n<p><strong>Moteino R2 (Receive)<\/strong><\/p>\n<p>TR0 &#8211; Digital 2<br \/>\nLED &#8211; Digital 9<br \/>\nTR1 &#8211; Digital 10<br \/>\nTR2 &#8211; Digital 11<br \/>\nTR3 &#8211; Digital 12<br \/>\nTR4 &#8211; Digital 13<br \/>\nSDA &#8211; Analog A4<br \/>\nSCL &#8211; Analog A5<br \/>\nVIN &#8211; +3.3V<br \/>\nGND &#8211; GND<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>DL2211Mk09pr.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/* ***** Don Luc Electronics \u00a9 *****\r\nSoftware Version Information\r\nProject #26 - Radio Frequency - Display - Mk05\r\n26-05\r\nReceive\r\nDL2211Mk09pr.ino\r\n2 x Moteino R2 (RFM12B)\r\n1 x SparkFun Micro OLED Breakout (Qwiic)\r\n1 x SparkFun 9 Degrees of Freedom - Sensor Stick\r\n2 x Lithium Ion Battery - 1Ah\r\n1 x SparkFun Cerberus USB Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ RFM12B Radio\r\n#include &lt;RFM12B.h&gt;\r\n\/\/ Two Wire Interface (TWI\/I2C)\r\n#include &lt;Wire.h&gt;\r\n\/\/ SparkFun Micro OLED\r\n#include &lt;SFE_MicroOLED.h&gt;\r\n\r\n\/\/ You will need to initialize the radio by telling it what ID\r\n\/\/ it has and what network it&#039;s on\r\n\/\/ The NodeID takes values from 1-127, 0 is reserved for sending \r\n\/\/ broadcast messages (send to all nodes)\r\n\/\/ The Network ID takes values from 0-255\r\n\/\/ By default the SPI-SS line used is D10 on Atmega328. \r\n\/\/ You can change it by calling .SetCS(pin) where pin can be {8,9,10}\r\n\/\/ Network ID used for this unit\r\n#define NODEID        1\r\n\/\/ The network ID we are on\r\n#define NETWORKID    99\r\n\/\/ Serial\r\n#define SERIAL_BAUD  115200\r\n\r\n\/\/ Encryption is OPTIONAL\r\n\/\/ to enable encryption you will need to:\r\n\/\/ - provide a 16-byte encryption KEY (same on all nodes that talk encrypted)\r\n\/\/ - to call .Encrypt(KEY) to start encrypting\r\n\/\/ - to stop encrypting call .Encrypt(NULL)\r\nuint8_t KEY[] = &quot;ABCDABCDABCDABCD&quot;;\r\n\r\n\/\/ Need an instance of the RFM12B Radio Module\r\nRFM12B radio;\r\n\r\n\/\/ Process Message\r\n\/\/ Message\r\nString msg = &quot;&quot;;\r\nint firstClosingBracket = 0;\r\n\/\/ Yaw Pitch Roll\r\nString sYaw = &quot;&quot;;\r\nString sPitch = &quot;&quot;;\r\nString sRoll = &quot;&quot;;\r\nfloat Yaw = 0;\r\nfloat Pitch = 0;\r\nfloat Roll = 0;\r\n\r\n\/\/ LED\r\nint iLED = 9;\r\n\r\n\/\/ SparkFun Micro OLED\r\n#define PIN_RESET 9\r\n#define DC_JUMPER 1\r\n\/\/ I2C declaration\r\nMicroOLED oled(PIN_RESET, DC_JUMPER);\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;26-05&quot;;\r\n\r\nvoid loop() {\r\n\r\n  \/\/ is RFM12B Radio\r\n  isRFM12BRadio();\r\n\r\n  \/\/ Micro OLED\r\n  isMicroOLED();\r\n\r\n}\r\n<\/pre>\n<p><strong>getFreeIMU.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ FreeIMU\r\n\/\/ isFreeIMU\r\nvoid isFreeIMU(){\r\n\r\n  \/\/ FreeIMU\r\n  \/\/ IMU Yaw Pitch Roll\r\n  \/\/ msg = &quot;&lt;IMU|1000|1000|1000|*&quot;;\r\n  \/\/ msg = &quot;&lt;IMU|&quot; + sYaw + &quot;|&quot; + sPitch + &quot;|&quot; + sRoll + &quot;|*&quot;\r\n  firstClosingBracket = 0;\r\n  \/\/ &quot;&lt;IMU|&quot;\r\n  firstClosingBracket = msg.indexOf(&#039;|&#039;);\r\n  msg.remove(0, 5);\r\n  \/\/ Yaw\r\n  firstClosingBracket = msg.indexOf(&#039;|&#039;);\r\n  sYaw = msg;\r\n  sYaw.remove(firstClosingBracket);\r\n  Yaw = sYaw.toFloat();\r\n  \/\/ Pitch\r\n  firstClosingBracket = firstClosingBracket + 1;\r\n  msg.remove(0, firstClosingBracket );  \r\n  firstClosingBracket = msg.indexOf(&#039;|&#039;);\r\n  sPitch = msg;\r\n  sPitch.remove(firstClosingBracket);\r\n  Pitch = sPitch.toFloat();\r\n  \/\/ Roll\r\n  firstClosingBracket = firstClosingBracket + 1;\r\n  msg.remove(0, firstClosingBracket );  \r\n  firstClosingBracket = msg.indexOf(&#039;|&#039;);\r\n  sRoll = msg;\r\n  sRoll.remove(firstClosingBracket);\r\n  Roll = sRoll.toFloat();\r\n\r\n}\r\n<\/pre>\n<p><strong>getMicroOLED.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ SparkFun Micro OLED\r\n\/\/ Setup Micro OLED\r\nvoid isSetupMicroOLED() {\r\n\r\n  \/\/ Initialize the OLED\r\n  oled.begin();\r\n  \/\/ Clear the display&#039;s internal memory\r\n  oled.clear(ALL);\r\n  \/\/ Display what&#039;s in the buffer (splashscreen)\r\n  oled.display();\r\n\r\n  \/\/ Delay 1000 ms\r\n  delay(1000);\r\n\r\n  \/\/ Clear the buffer.\r\n  oled.clear(PAGE);\r\n  \r\n}\r\n\/\/ Micro OLED\r\nvoid isMicroOLED() {\r\n\r\n  \/\/ Text Display FreeIMU\r\n  \/\/ Clear the display\r\n  oled.clear(PAGE);\r\n  \/\/ Set cursor to top-left\r\n  oled.setCursor(0, 0);\r\n  \/\/ Set font to type 0\r\n  oled.setFontType(0);\r\n  \/\/ FreeIMU\r\n  oled.print(&quot;FreeIMU&quot;);\r\n  oled.setCursor(0, 12);\r\n  \/\/ Yaw\r\n  oled.print(&quot;Y: &quot;);\r\n  oled.print(Yaw);\r\n  oled.setCursor(0, 25);\r\n  \/\/ Pitch\r\n  oled.print(&quot;P: &quot;);\r\n  oled.print(Pitch);\r\n  oled.setCursor(0, 39);\r\n  \/\/ Roll\r\n  oled.print(&quot;R: &quot;);\r\n  oled.print(Roll);\r\n  oled.display();\r\n\r\n}\r\n<\/pre>\n<p><strong>getRFM12BRadio.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ RFM12B Radio\r\nvoid isSetupRFM12BRadio()\r\n{\r\n\r\n  \/\/ RFM12B Radio\r\n  radio.Initialize(NODEID, RF12_433MHZ, NETWORKID);\r\n  \/\/ Encryption\r\n  radio.Encrypt(KEY);\r\n  \/\/ Transmitting\r\n  Serial.println(&quot;Listening...&quot;);\r\n  \r\n}\r\n\/\/ is RFM12 BRadio\r\nvoid isRFM12BRadio()\r\n{\r\n\r\n  \/\/ Receive\r\n  if (radio.ReceiveComplete())\r\n  {\r\n    \r\n    \/\/ CRC Pass\r\n    if (radio.CRCPass())\r\n    {\r\n      \r\n      \/\/ Serial\r\n      Serial.print(&#039;[&#039;);\r\n      Serial.print(radio.GetSender());\r\n      Serial.print(&quot;] &quot;);\r\n      \r\n      \/\/ Message\r\n      msg = &quot;&quot;;\r\n      \r\n      \/\/ Can also use radio.GetDataLen() if you don&#039;t like pointers\r\n      for (byte i = 0; i &lt; *radio.DataLen; i++)\r\n      {\r\n        \r\n        Serial.print((char)radio.Data[i]);\r\n        msg = msg + (char)radio.Data[i];\r\n        \r\n      }\r\n\r\n      \/\/ Turn the LED on HIGH\r\n      digitalWrite( iLED , HIGH);\r\n      \r\n      \/\/ FreeIMU\r\n      \/\/ Yaw Pitch Roll\r\n      isFreeIMU();\r\n  \r\n      \/\/ ACK Requested\r\n      if (radio.ACKRequested())\r\n      {\r\n        \r\n        \/\/ Send ACK\r\n        radio.SendACK();\r\n        Serial.print(&quot; - ACK Sent&quot;);\r\n        \r\n      }\r\n\r\n      \/\/ Turn the LED on LOW\r\n      digitalWrite( iLED , LOW);\r\n    \r\n    }\r\n    else\r\n    {\r\n      \r\n      \/\/ BAD-CRC\r\n      Serial.print(&quot;BAD-CRC&quot;);\r\n\r\n    }\r\n\r\n    \/\/ Serial\r\n    Serial.println();\r\n\r\n  } \r\n  \r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Setup\r\nvoid setup()\r\n{\r\n\r\n  \/\/ Serial\r\n  Serial.begin(SERIAL_BAUD);\r\n\r\n  \/\/ Give display time to power on\r\n  delay(100);\r\n  \r\n  \/\/ Set up I2C bus\r\n  Wire.begin();\r\n\r\n  \/\/ Setup Micro OLED\r\n  isSetupMicroOLED();\r\n\r\n  \/\/ LED\r\n  pinMode( iLED , OUTPUT);\r\n\r\n  \/\/ RFM12B Radio\r\n  isSetupRFM12BRadio();\r\n\r\n}\r\n<\/pre>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Moteino R2 (Send)<\/strong><\/p>\n<p>TR0 &#8211; Digital 2<br \/>\nLED &#8211; Digital 9<br \/>\nTR1 &#8211; Digital 10<br \/>\nTR2 &#8211; Digital 11<br \/>\nTR3 &#8211; Digital 12<br \/>\nTR4 &#8211; Digital 13<br \/>\nSDA &#8211; Analog A4<br \/>\nSCL &#8211; Analog A5<br \/>\nVIN &#8211; +3.3V<br \/>\nGND &#8211; GND<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>DL2211Mk09ps.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/* ***** Don Luc Electronics \u00a9 *****\r\nSoftware Version Information\r\nProject #26 - Radio Frequency - Display - Mk05\r\n26-05\r\nSend\r\nDL2211Mk09ps.ino\r\n2 x Moteino R2 (RFM12B)\r\n1 x SparkFun Micro OLED Breakout (Qwiic)\r\n1 x SparkFun 9 Degrees of Freedom - Sensor Stick\r\n2 x Lithium Ion Battery - 1Ah\r\n1 x SparkFun Cerberus USB Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ RFM12B Radio\r\n#include &lt;RFM12B.h&gt;\r\n\/\/ Sleep\r\n#include &lt;avr\/sleep.h&gt;\r\n\/\/ Two Wire Interface (TWI\/I2C)\r\n#include &lt;Wire.h&gt;\r\n\/\/ Includes and variables for IMU integration\r\n\/\/ Accelerometer\r\n#include &lt;ADXL345.h&gt;\r\n\/\/ Magnetometer\r\n#include &lt;HMC58X3.h&gt;\r\n\/\/ MEMS Gyroscope\r\n#include &lt;ITG3200.h&gt;\r\n\/\/ Debug\r\n#include &quot;DebugUtils.h&quot;\r\n\/\/ FreeIMU\r\n#include &lt;CommunicationUtils.h&gt;\r\n#include &lt;FreeIMU.h&gt;\r\n\r\n\/\/ You will need to initialize the radio by telling it what ID\r\n\/\/ it has and what network it&#039;s on\r\n\/\/ The NodeID takes values from 1-127, 0 is reserved for sending \r\n\/\/ broadcast messages (send to all nodes)\r\n\/\/ The Network ID takes values from 0-255\r\n\/\/ By default the SPI-SS line used is D10 on Atmega328. \r\n\/\/ You can change it by calling .SetCS(pin) where pin can be {8,9,10}\r\n\/\/ Network ID used for this unit\r\n#define NODEID        2\r\n\/\/ The network ID we are on\r\n#define NETWORKID    99\r\n\/\/ The node ID we&#039;re sending to\r\n#define GATEWAYID     1\r\n\/\/ # of ms to wait for an ack\r\n#define ACK_TIME     50\r\n\/\/ Serial\r\n#define SERIAL_BAUD  115200\r\n\r\n\/\/ Encryption is OPTIONAL\r\n\/\/ to enable encryption you will need to:\r\n\/\/ - provide a 16-byte encryption KEY (same on all nodes that talk encrypted)\r\n\/\/ - to call .Encrypt(KEY) to start encrypting\r\n\/\/ - to stop encrypting call .Encrypt(NULL)\r\nuint8_t KEY[] = &quot;ABCDABCDABCDABCD&quot;;\r\n\r\n\/\/ Wait this many ms between sending packets\r\nint interPacketDelay = 1000;\r\n\/\/ Input\r\nchar input = 0;\r\n\r\n\/\/ Need an instance of the RFM12B Radio Module\r\nRFM12B radio;\r\n\/\/ Send Size\r\nbyte sendSize = 0;\r\n\/\/ Payload\r\nchar payload[100];\r\n\/\/ Request ACK\r\nbool requestACK = false;\r\n\r\n\/\/ LED\r\nint iLED = 9;\r\n\r\n\/\/ Set the FreeIMU object\r\nFreeIMU my3IMU = FreeIMU();\r\n\r\n\/\/ Yaw Pitch Roll\r\nString zzzzzz = &quot;&quot;;\r\nString sYaw = &quot;&quot;;\r\nString sPitch = &quot;&quot;;\r\nString sRoll = &quot;&quot;;\r\nfloat ypr[3];\r\nfloat Yaw = 0;\r\nfloat Pitch = 0;\r\nfloat Roll = 0;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;26-05&quot;;\r\n\r\nvoid loop()\r\n{\r\n\r\n  \/\/ isFreeIMU\r\n  isFreeIMU();\r\n\r\n  \/\/ is RFM12B Radio\r\n  isRFM12BRadio();\r\n\r\n  \/\/ Inter Packet Delay\r\n  delay(interPacketDelay);\r\n  \r\n}\r\n<\/pre>\n<p><strong>getFreeIMU.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ FreeIMU\r\n\/\/ isFreeIMU\r\nvoid isFreeIMU(){\r\n\r\n  \/\/ FreeIMU\r\n  \/\/ Yaw Pitch Roll\r\n  my3IMU.getYawPitchRoll(ypr);\r\n  \/\/ Yaw\r\n  Yaw = ypr[0];\r\n  \/\/ Pitch\r\n  Pitch = ypr[1];\r\n  \/\/ Roll\r\n  Roll = ypr[2];\r\n\r\n}\r\n<\/pre>\n<p><strong>getRFM12BRadio.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ RFM12B Radio\r\nvoid isSetupRFM12BRadio(){\r\n\r\n  \/\/ RFM12B Radio\r\n  radio.Initialize(NODEID, RF12_433MHZ, NETWORKID);\r\n  \/\/ Encryption\r\n  radio.Encrypt(KEY);\r\n  \/\/ Sleep right away to save power\r\n  radio.Sleep();\r\n  \/\/ Transmitting\r\n  Serial.println(&quot;Transmitting...\\n\\n&quot;);\r\n  \r\n}\r\n\/\/ is RFM12 BRadio\r\nvoid isRFM12BRadio(){\r\n\r\n  \/\/ sYaw, sPitch, sRoll &quot;&quot;\r\n  sYaw = &quot;&quot;;\r\n  sPitch = &quot;&quot;;\r\n  sRoll = &quot;&quot;;\r\n\r\n  \/\/ sYaw, sPitch, sRoll concat\r\n  sYaw.concat(Yaw);\r\n  sPitch.concat(Pitch);\r\n  sRoll.concat(Roll);\r\n\r\n  \/\/ zzzzzz &quot;&quot;\r\n  zzzzzz = &quot;&quot;;\r\n\r\n  \/\/ zzzzzz = &quot;&lt;IMU|1000|1000|1000|*&quot;;\r\n  \/\/ zzzzzz = &quot;&lt;IMU|&quot; + sYaw + &quot;|&quot; + sPitch + &quot;|&quot; + sRoll + &quot;|*&quot;\r\n  zzzzzz = &quot;&lt;IMU|&quot; + sYaw + &quot;|&quot; + sPitch + &quot;|&quot; + sRoll + &quot;|*&quot;;\r\n\r\n  \/\/ sendSize Length\r\n  sendSize = zzzzzz.length();\r\n\r\n  \/\/ sendSize\r\n  payload[sendSize];\r\n\r\n  \/\/ sendSize, charAt\r\n  for(byte i = 0; i &lt; sendSize+1; i++){\r\n\r\n    payload[i] = zzzzzz.charAt(i);\r\n    \r\n  }\r\n    \r\n  \/\/ payload\r\n  Serial.print(payload);\r\n  \r\n  \/\/ Request ACK\r\n  requestACK = sendSize;\r\n  \r\n  \/\/ Wakeup\r\n  radio.Wakeup();\r\n  \r\n  \/\/ Turn the LED on HIGH\r\n  digitalWrite( iLED , HIGH);\r\n  \r\n  \/\/ Send\r\n  radio.Send(GATEWAYID, payload, sendSize, requestACK);\r\n\r\n  \/\/ Request ACK\r\n  if (requestACK)\r\n  {\r\n    \r\n    Serial.print(&quot; - waiting for ACK...&quot;);\r\n    if (waitForAck()){\r\n      \r\n      Serial.print(&quot;Ok!&quot;);\r\n      \r\n    }\r\n    else Serial.print(&quot;nothing...&quot;);\r\n    \r\n  }\r\n\r\n  \/\/ Turn the LED on LOW\r\n  digitalWrite( iLED , LOW);\r\n\r\n  \/\/ Sleep\r\n  radio.Sleep();\r\n\r\n  \/\/ Serial\r\n  Serial.println();\r\n  \r\n}\r\n\/\/ Wait a few milliseconds for proper ACK, return true if received\r\nstatic bool waitForAck(){\r\n  \r\n  \/\/ Now\r\n  long now = millis();\r\n\r\n  \/\/ ACK\r\n  while (millis() - now &lt;= ACK_TIME){\r\n    \r\n\r\n    if (radio.ACKReceived(GATEWAYID)){\r\n      \r\n      return true;\r\n\r\n    }\r\n\r\n  }\r\n  \r\n  return false;\r\n  \r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Setup\r\nvoid setup(){\r\n\r\n  \/\/ Serial\r\n  Serial.begin(SERIAL_BAUD);\r\n\r\n  \/\/ LED\r\n  pinMode( iLED , OUTPUT);\r\n\r\n  \/\/ Set up I2C bus\r\n  Wire.begin();\r\n\r\n  \/\/ RFM12B Radio\r\n  isSetupRFM12BRadio();\r\n\r\n  \/\/ Pause\r\n  delay(5);\r\n  \/\/ Initialize IMU\r\n  my3IMU.init();\r\n  \/\/ Pause\r\n  delay(5);\r\n\r\n}\r\n<\/pre>\n<p>&#8212;&#8212;<\/p>\n<p><strong>People can contact us:<\/strong> https:\/\/www.donluc.com\/?page_id=1927<\/p>\n<p><strong>Technology Experience<\/strong><\/p>\n<ul>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Wireless (Radio Frequency, Bluetooth, WiFi, Etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Camera and Video Capture Receiver Stationary, Wheel\/Tank and Underwater Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial and Marine<\/li>\n<li>Machine Learning<\/li>\n<li>RTOS<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<\/ul>\n<p><strong>Instructor, E-Mentor, STEAM, and Arts-Based Training<\/strong><\/p>\n<ul>\n<li>IoT<\/li>\n<li>PIC Microcontrollers<\/li>\n<li>Arduino<\/li>\n<li>Raspberry Pi<\/li>\n<li>Espressif<\/li>\n<li>Robotics<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Luc Paquin \u2013 Curriculum Vitae &#8211; 2023<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/channel\/UC5eRjrGn1CqkkGfZy0jxEdA<br \/>\n<strong>Twitter:<\/strong> https:\/\/twitter.com\/labs_steam<br \/>\n<strong>Pinterest:<\/strong> https:\/\/www.pinterest.com\/NeoSteamLabs\/<br \/>\n<strong>Instagram:<\/strong> https:\/\/www.instagram.com\/neosteamlabs\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc #RadioFrequency #Moteino #Send #Receive #Display #FreeIMU #Magnetometer #Accelerometer #Gyroscope #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; SparkFun Micro OLED Breakout The SparkFun Qwiic Micro OLED Breakout is a Qwiic-enabled version of our popular Micro OLED display. The small monochrome, blue-on-black OLED screen presents incredibly clear images for your &#8230; <a title=\"Project #26 &#8211; Radio Frequency &#8211; Display &#8211; Mk05\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=3336\" aria-label=\"Read more about Project #26 &#8211; Radio Frequency &#8211; Display &#8211; Mk05\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[247,50,49,38,59,5,261,58,10,43],"tags":[251,6,92,102,4,87,19,85,252,246,24,263,9,264,109,33,34],"class_list":["post-3336","post","type-post","status-publish","format-standard","hentry","category-radio-frequency","category-arduino","category-consultant","category-digitalelectronics","category-fritzing","category-microcontrollers","category-moteino","category-arduino-programming","category-projects","category-sparkfun","tag-accelerometer","tag-arduino","tag-battery","tag-components","tag-consultant","tag-display","tag-electronics","tag-fritzing","tag-gyroscope","tag-magnetometer","tag-microcontroller","tag-moteino","tag-programming","tag-radio-frequency","tag-sparkfun","tag-technology","tag-video-blog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/3336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3336"}],"version-history":[{"count":2,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/3336\/revisions"}],"predecessor-version":[{"id":3661,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/3336\/revisions\/3661"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}