TinyCircuits

Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
General Discussion / Re: Tiny Screen
« Last post by HunterHykes on January 07, 2019, 01:29:43 PM »
Hi jmontoya,

Due to the hardware setup of the TinyScreen and TinyScreen+, it is not possible to read data from the registers in the Graphic Display Data RAM via SPI. The only way to read a specific pixel's color would rely on the use of a buffer array and reference the specific index corresponding to the desired coordinate.

However, if you just chose the pixel on the center of the screen to detect the color of the entire screen, here's something you could do.

uint16_t color;

if(x < 120){
     color = TS_8b_Yellow;   
}else{
     color = TS_8b_Red;   
}

display.drawRect(0, 0, 96, 64, TSRectangleFilled, color);

if (color != TS_8b_Yellow)
  display.drawRect(0,0,96,64,TSRectangleFilled,TS_8b_Yellow);

I more or less made an assumption of what you were trying to do, but I hope this helps!

-Hunter
72
TinyDuino / Compile error when linking TinyDuino with Rockblock
« Last post by IanBZa on January 07, 2019, 07:14:56 AM »
Hi.

I am trying to connect a TinyDuino to a Rockblock Iridium but im getting compile errors and I have no idea why.

The error i'm getting is:
Code: [Select]
lto1: internal compiler error: in lto_output_varpool_node, at lto-cgraph.c:624
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: fatal error: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc returned 1 exit status
compilation terminated.
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Pro or Pro Mini.

I'm using the stock standard example for the Rockblock - but i've switched it to software serial:
Code: [Select]
#include <IridiumSBD.h>
#include <time.h>
/*
 * Time
 *
 * This sketch demonstrates how to retrieve the Iridium system time
 * from the modem using the new getSystemTime method. This uses
 * the Iridium command AT-MSSTM to acquire the time.  The method will
 * fail if the Iridium network has not yet been acquired.
 *
 * Assumptions
 *
 * The sketch assumes an Arduino Mega or other Arduino-like device with
 * multiple HardwareSerial ports. It assumes the satellite modem is
 * connected to Serial3. Change this as needed. SoftwareSerial on an Uno
 * works fine as well.
 */
#include <SoftwareSerial.h>


SoftwareSerial IridiumSerial(4, 5);
/*#define IridiumSerial Serial3*/
#define DIAGNOSTICS false // Change this to see diagnostics

// Declare the IridiumSBD object
IridiumSBD modem(IridiumSerial);

void setup()
{
  int err;
 
  // Start the console serial port
  Serial.begin(115200);
  while (!Serial);

  // Start the serial port connected to the satellite modem
  IridiumSerial.begin(19200);

  // If we're powering the device by USB, tell the library to
  // relax timing constraints waiting for the supercap to recharge.
  modem.setPowerProfile(IridiumSBD::USB_POWER_PROFILE);

  // Begin satellite modem operation
  Serial.println("Starting modem...");
  err = modem.begin();
  if (err != ISBD_SUCCESS)
  {
    Serial.print("Begin failed: error ");
    Serial.println(err);
    if (err == ISBD_NO_MODEM_DETECTED)
      Serial.println("No modem detected: check wiring.");
    return;
  }
}

void loop()
{
   struct tm t;
   int err = modem.getSystemTime(t);
   if (err == ISBD_SUCCESS)
   {
      char buf[32];
      sprintf(buf, "%d-%02d-%02d %02d:%02d:%02d",
         t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec);
      Serial.print("Iridium time/date is ");
      Serial.println(buf);
   }

   else if (err == ISBD_NO_NETWORK)
   {
      Serial.println("No network detected.  Waiting 10 seconds.");
   }

   else
   {
      Serial.print("Unexpected error ");
      Serial.println(err);
      return;
   }

   // Delay 10 seconds
   delay(10 * 1000UL);
}

#if DIAGNOSTICS
void ISBDConsoleCallback(IridiumSBD *device, char c)
{
  Serial.write(c);
}

void ISBDDiagsCallback(IridiumSBD *device, char c)
{
  Serial.write(c);
}
#endif

Any ideas as to what could be happening?

Thanks in advance.
 
Ian
73
General Discussion / Tiny Screen
« Last post by jmontoya on January 06, 2019, 01:40:44 AM »
I have to change the color of the screen and the code below works:

if(x < 120){
          display.drawRect(0,0,96,64,TSRectangleFilled,TS_8b_Yellow);   
        }else{
          display.drawRect(0,0,96,64,TSRectangleFilled,TS_8b_Red);   
        }

I want to set the cursor to the middle of the screen and check the color of the screen in that position. Something like this

display.setCursor(48,32);
if (display.Color!=TS_8b_Yellow)
  display.drawRect(0,0,96,64,TSRectangleFilled,TS_8b_Yellow);   

Thanks in advance
74
Tiny Arcade / Re: Cabinet Art Template
« Last post by djb_rh on January 05, 2019, 06:06:51 PM »
So the art template is useful, but is there any chance you can make the dxf for the cabinet itself available?  I'd like to make a couple minor changes and have my own laser cutter.  Pretty please?


--Donnie
75
New Product Ideas / MicroPython and or CircuitPython for the TinyZero
« Last post by alpierce on January 05, 2019, 02:18:36 PM »
I'd like to get MicroPython or CircuitPython running on the TinyZero board. The first bit of info I need is about the boot loader on the TinyZero. I am hoping it is the Bossa boot loader, since I am familiar with that and already have the Bossac software for uploading binary images. I have recently started using Python a lot more and it really speeds up the development cycle. It would be a great addition to the TinyZero.
76
Hi all,
I am seeking to Interfacing 433MHZ LONG RANGE RADIO TINYSHIELD with EFM8UB1-SLSTK2000A Evaluation board through the M/C SPI interface. Is it possible to interface 433 MHz module with the onboard  Silicon Labs EFM8 EFM8UB1 M/C? Also I want to program Tinyshield using Embedded C code. Which IDE is to be preferred? Thanks
77
TinyDuino / Re: WiFi TinyShield, ATWINC1500-MR210B, Firmware Updater
« Last post by sobedrinker42 on January 03, 2019, 11:10:29 PM »
Hello,

Thank you for this post, but i'm still running into some issues.  I just recently purchased the TinyZero and WiFi Tinyshield.  After completed the steps that you wrote out here (setting baud to 250000 and setPins), I get to the point where my test connection says "The Programmer is working!" 

When I attempt to update the firmware (WINC-1501  Model B 19.5.4), I get an stack trace error that says "Error while erasing flash memory."  i'm just wondering if i'm missing anything and if you could shed some light onto some other troubleshooting ideas.

Code: [Select]
java.lang.Exception: Error while erasing flash memory.
at cc.arduino.plugins.wifi101.flashers.java.FlasherSerialClient.eraseFlash(FlasherSerialClient.java:139)
at cc.arduino.plugins.wifi101.flashers.java.JavaFlasher.updateFirmware(JavaFlasher.java:79)
at cc.arduino.plugins.wifi101.UpdaterImpl$3.run(UpdaterImpl.java:138)

Thank you,

Austin
78
TinyDuino / Re: USB TinyShield and Bluetooth
« Last post by loaf on January 02, 2019, 09:52:28 PM »
I've found what seems to be a solution. Full disclosure: I know next to nothing about C++ or Arduino programming.

The BLEsetup() function in the setup loop would never terminate. I added a return control at the end of that function (which lives in the UART.ino) -- that fixed the issue. Maybe that's not the best way to do it, but for now I am able to pass data back and forth via the BLE connection.

I'm all ears if there is a more correct solution.

Andrew
79
TinyDuino / Re: USB TinyShield and Bluetooth
« Last post by loaf on January 02, 2019, 06:30:25 PM »
I'm also having trouble getting the UARTPassThrough sketch -- the example in the STBLE library -- to work. I'm using the Arduino IDE (1.8.8) with a TinyDuino Basic Kit (Coin Cell), BLE TinyShield (ST) and accelerometer TinyShield.

In my case, it appears the sketch never escapes the setup() block. At 9600 baud the serial monitor spits O(10) garbage characters (e.g. BLE StacQ⸮) and then nothing else. At 115200 baud the serial monitor floods with repeated BLE Stack Initialized ... UART service added successfully. messages. In both instances the baud rate set in the sketch and in the serial monitor window match properly. Screenshots attached.

In neither case does the chip become discoverable to scanning devices. I'm new to this whole Arduino/TinyDuino scene, so guidance from you more experienced folks is very welcome! (I emailed info@tinycircuits late this afternoon, but I figured it wouldn't hurt to ask here too.)

Andrew
80
Tiny Arcade / Re: classic games ?
« Last post by mjculross on December 29, 2018, 06:36:34 PM »
See the following for details on the newly posted version 1.1 of TinyQuix:

   http://forum.tinycircuits.com/index.php?topic=1986.msg4055#msg4055


Enjoy !!

Mark J Culross
KD5RXT
Pages: 1 ... 6 7 [8] 9 10