TinyCircuits

TinyCircuits Products => User Projects / Code Examples => Topic started by: kourosh on May 08, 2018, 08:18:02 AM

Title: TinyScreen+ coupled with 433MHZ Radio (Setup)
Post by: kourosh on May 08, 2018, 08:18:02 AM
I'm using the following shields in my project:

1.TINYSCREEN+ (PROCESSOR, OLED & USB IN ONE)

2.433MHZ LONG RANGE RADIO TINYSHIELD

And here's my code (very simple):

Code: [Select]
#include <Wire.h>
#include <SPI.h>
#include <TinyScreen.h>
#include "RH_RF22.h"

TinyScreen display = TinyScreen(TinyScreenPlus);
RH_RF22 rf22(7,3);

void setup() {
  display.begin();
  display.setBrightness(10);

  SerialUSB.begin(9600);

  if(rf22.init())
  {
   SerialUSB.println("Radio Set");
  } else {
   SerialUSB.println("Radio Failed");
  }
}

The same code if I use it with TinyDuino processor works fine (for TinyDuino processor I use Serial instead of SerialUSB)

However when I use TinyScreen+ I never get the return value of "
Code: [Select]
rf22.init()"

It seems like the process gets stuck when it reaches
Code: [Select]
rf22.init()
I am very new in this field and really looking forward to your help.

Thank you,