BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Chris/

Pages: [1]
1
Discussion - Cleo / CleO file write append to new line
« on: December 10, 2018, 03:54:20 PM »
Hi,

I'm trying to append some information to a new line within the same .txt file using the CleO file system however i seem to just be overwriting the same line each time.

Code: [Select]
#include <SPI.h>
#include <CleO.h>

void setup() {
  char STR1[] = "ABCDEFG";
  char STR2[] = "HHHHHHH";
  char STR3[] = "IIIIIII";
  int16_t actual;

  CleO.begin();

  int16_t f = CleO.FOpen("test.txt", FILE_OPEN_EXISTING | FILE_WRITE);
  CleO.FWrite(f, strlen(STR1) + 1, (uint8_t*)STR1, actual);
  CleO.FClose(f);

  CleO.FOpen("test.txt", FILE_OPEN_EXISTING | FILE_WRITE);
  CleO.FWrite(f, strlen(STR2) + 1, (uint8_t*)STR2, actual);
  CleO.FClose(f);

  CleO.FOpen("test.txt", FILE_OPEN_EXISTING | FILE_WRITE);
  CleO.FWrite(f, strlen(STR3) + 1, (uint8_t*)STR3, actual);
  CleO.FClose(f);
}

void loop() {}

I'm after a file that gives:

  ABCDEFG
  HHHHHHH
  IIIIIII

but the code above gives:

IIIIIII

Is there a way of achieving what I'm after?

thanks,

Chris

2
Discussion - Cleo / CleO External Flash Fail
« on: December 04, 2018, 10:58:54 PM »
Hi,

Its happened a couple of times now where the eflash has failed and left me without the cleo picture on the splash screen and then an error trap when its failed to load Icons in.

Is this a know fault or am i doing something wrong?


This is a cut down version of how i call the icons:

Code: [Select]
int16_t Settings;     

void setup() {
Settings = CleO.LoadIcon("@Icons/m36.ftico", 707);     
}
void loop() {
CleO.Bitmap(Settings, (0.005 * SCREEN_WIDTH), (0.225 * SCREEN_HEIGHT));
}

Thanks,

Chris

Pages: [1]