TinyCircuits

Recent Posts

Pages: 1 [2] 3 4 ... 10
11
General Discussion / Re: GPS Tracker with Bluetooth
« Last post by DimSim1010 on August 10, 2018, 05:17:42 PM »

C:\Users\Rosana\Documents\Arduino\BIke_GPS_Tracker\BIke_GPS_Tracker.ino:42:0: warning: "PIPE_UART_OVER_BTLE_UART_TX_TX" redefined

 #define PIPE_UART_OVER_BTLE_UART_TX_TX 0

 ^

In file included from sketch\UART.h:6:0,

                 from C:\Users\Rosana\Documents\Arduino\BIke_GPS_Tracker\BIke_GPS_Tracker.ino:5:

sketch\services.h:61:0: note: this is the location of the previous definition

 #define PIPE_UART_OVER_BTLE_UART_TX_TX          12

 ^

In file included from sketch\lib_aci.h:35:0,

                 from sketch\UART.h:3,

                 from C:\Users\Rosana\Documents\Arduino\BIke_GPS_Tracker\BIke_GPS_Tracker.ino:5:

hal_aci_tl.h:62: error: expected initializer before 'hal_aci_data_t'

 } _aci_packed_ hal_aci_data_t;

                ^

hal_aci_tl.h:64: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(hal_aci_data_t, HAL_ACI_MAX_LENGTH + 2);

                ^

In file included from sketch\lib_aci.h:35:0,

                 from sketch\UART.h:3,

                 from C:\Users\Rosana\Documents\Arduino\BIke_GPS_Tracker\BIke_GPS_Tracker.ino:5:

hal_aci_tl.h:105: error: 'hal_aci_data_t' was not declared in this scope

 bool hal_aci_tl_send(hal_aci_data_t *aci_buffer);

                      ^

hal_aci_tl.h:105: error: 'aci_buffer' was not declared in this scope

 bool hal_aci_tl_send(hal_aci_data_t *aci_buffer);

                                      ^

hal_aci_tl.h:114: error: 'hal_aci_data_t' does not name a type

 hal_aci_data_t * hal_aci_tl_poll_get(void);

 ^

hal_aci_tl.h:121: error: 'hal_aci_data_t' was not declared in this scope

 bool hal_aci_tl_event_get(hal_aci_data_t *p_aci_data);

                           ^

hal_aci_tl.h:121: error: 'p_aci_data' was not declared in this scope

 bool hal_aci_tl_event_get(hal_aci_data_t *p_aci_data);

                                           ^

hal_aci_tl.h:128: error: 'hal_aci_data_t' was not declared in this scope

 bool hal_aci_tl_event_peek(hal_aci_data_t *p_aci_data);

                            ^

hal_aci_tl.h:128: error: 'p_aci_data' was not declared in this scope

 bool hal_aci_tl_event_peek(hal_aci_data_t *p_aci_data);

                                            ^

In file included from sketch\lib_aci.h:36:0,

                 from sketch\UART.h:3,

                 from C:\Users\Rosana\Documents\Arduino\BIke_GPS_Tracker\BIke_GPS_Tracker.ino:5:

aci_queue.h:53: error: 'hal_aci_data_t' does not name a type

  hal_aci_data_t           aci_data[ACI_QUEUE_SIZE];

  ^

aci_queue.h:60: error: 'hal_aci_data_t' has not been declared

 bool aci_queue_dequeue(aci_queue_t *aci_q, hal_aci_data_t *p_data);

                                            ^

aci_queue.h:61: error: 'hal_aci_data_t' has not been declared

 bool aci_queue_dequeue_from_isr(aci_queue_t *aci_q, hal_aci_data_t *p_data);

                                                     ^

aci_queue.h:63: error: 'hal_aci_data_t' has not been declared

 bool aci_queue_enqueue(aci_queue_t *aci_q, hal_aci_data_t *p_data);

                                            ^

aci_queue.h:64: error: 'hal_aci_data_t' has not been declared

 bool aci_queue_enqueue_from_isr(aci_queue_t *aci_q, hal_aci_data_t *p_data);

                                                     ^

aci_queue.h:72: error: 'hal_aci_data_t' has not been declared

 bool aci_queue_peek(aci_queue_t *aci_q, hal_aci_data_t *p_data);

                                         ^

aci_queue.h:73: error: 'hal_aci_data_t' has not been declared

 bool aci_queue_peek_from_isr(aci_queue_t *aci_q, hal_aci_data_t *p_data);

                                                  ^

In file included from sketch\lib_aci.h:38:0,

                 from sketch\UART.h:3,

                 from C:\Users\Rosana\Documents\Arduino\BIke_GPS_Tracker\BIke_GPS_Tracker.ino:5:

aci_cmds.h:173: error: expected initializer before 'aci_cmd_opcode_t'

 } _aci_packed_ aci_cmd_opcode_t;

                ^

aci_cmds.h:175: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_opcode_t, 1);

                ^

aci_cmds.h:184: error: expected initializer before 'aci_cmd_params_test_t'

 } _aci_packed_ aci_cmd_params_test_t;

                ^

aci_cmds.h:186: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_test_t, 1);

                ^

aci_cmds.h:195: error: expected initializer before 'aci_cmd_params_echo_t'

 } _aci_packed_ aci_cmd_params_echo_t;

                ^

aci_cmds.h:197: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_echo_t, ACI_ECHO_DATA_MAX_LEN);

                ^

aci_cmds.h:207: error: expected initializer before 'aci_cmd_params_dtm_cmd_t'

 } _aci_packed_ aci_cmd_params_dtm_cmd_t;

                ^

aci_cmds.h:216: error: expected initializer before 'aci_cmd_params_setup_t'

 } _aci_packed_ aci_cmd_params_setup_t;

                ^

aci_cmds.h:218: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_setup_t, 1);

                ^

aci_cmds.h:229: error: expected initializer before 'aci_cmd_params_write_dynamic_data_t'

 } _aci_packed_ aci_cmd_params_write_dynamic_data_t;

                ^

aci_cmds.h:238: error: expected initializer before 'aci_cmd_params_set_local_data_t'

 } _aci_packed_ aci_cmd_params_set_local_data_t;

                ^

aci_cmds.h:248: error: expected initializer before 'aci_cmd_params_connect_t'

 } _aci_packed_ aci_cmd_params_connect_t;

                ^

aci_cmds.h:250: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_connect_t, 4);

                ^

aci_cmds.h:260: error: expected initializer before 'aci_cmd_params_bond_t'

 } _aci_packed_ aci_cmd_params_bond_t;

                ^

aci_cmds.h:262: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_bond_t, 4);

                ^

aci_cmds.h:271: error: expected initializer before 'aci_cmd_params_disconnect_t'

 } _aci_packed_ aci_cmd_params_disconnect_t;

                ^

aci_cmds.h:273: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_disconnect_t, 1);

                ^

aci_cmds.h:282: error: expected initializer before 'aci_cmd_params_set_tx_power_t'

 } _aci_packed_ aci_cmd_params_set_tx_power_t;

                ^

aci_cmds.h:284: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_set_tx_power_t, 1);

                ^

aci_cmds.h:292: error: expected initializer before 'aci_cmd_params_change_timing_t'

 } _aci_packed_ aci_cmd_params_change_timing_t;

                ^

aci_cmds.h:294: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_change_timing_t, 8);

                ^

aci_cmds.h:303: error: expected initializer before 'aci_cmd_params_open_remote_pipe_t'

 } _aci_packed_ aci_cmd_params_open_remote_pipe_t;

                ^

aci_cmds.h:312: error: expected initializer before 'aci_cmd_params_send_data_t'

 } _aci_packed_ aci_cmd_params_send_data_t;

                ^

aci_cmds.h:321: error: expected initializer before 'aci_cmd_params_send_data_ack_t'

 } _aci_packed_ aci_cmd_params_send_data_ack_t;

                ^

aci_cmds.h:330: error: expected initializer before 'aci_cmd_params_request_data_t'

 } _aci_packed_ aci_cmd_params_request_data_t;

                ^

aci_cmds.h:340: error: expected initializer before 'aci_cmd_params_send_data_nack_t'

 } _aci_packed_ aci_cmd_params_send_data_nack_t;

                ^

aci_cmds.h:342: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_send_data_nack_t, 2);

                ^

aci_cmds.h:352: error: expected initializer before 'aci_cmd_params_set_app_latency_t'

 } _aci_packed_ aci_cmd_params_set_app_latency_t;

                ^

aci_cmds.h:354: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_set_app_latency_t, 3);

                ^

aci_cmds.h:367: error: expected initializer before 'aci_cmd_params_set_key_t'

 } _aci_packed_ aci_cmd_params_set_key_t;

                ^

aci_cmds.h:369: error: expected constructor, destructor, or type conversion before '(' token

 ACI_ASSERT_SIZE(aci_cmd_params_set_key_t, 17);

                ^

aci_cmds.h:377: error: expected initializer before 'aci_cmd_params_open_adv_pipe_t'

 } _aci_packed_ aci_cmd_params_open_adv_pipe_t;

                ^

aci_cmds.h:387: error: expected initializer before 'aci_cmd_params_broadcast_t'

 } _aci_packed_ aci_cmd_params_broadcast_t;

                ^

aci_cmds.h:396: error: expected initializer before 'aci_cmd_params_close_remote_pipe_t'

 } _aci_packed_ aci_cmd_params_close_remote_pipe_t;

                ^

aci_cmds.h:405: error: 'aci_cmd_opcode_t' does not name a type

   aci_cmd_opcode_t cmd_opcode; /**< enum aci_cmd_opcode_t -> Opcode of the ACI command */

   ^

12
General Discussion / Re: GPS Tracker with Bluetooth
« Last post by lennevia on August 10, 2018, 12:44:12 PM »
Hello,

Can you copy the error messages you are getting?

Thank you
13
General Discussion / Re: GPS Tracker with Bluetooth
« Last post by DimSim1010 on August 09, 2018, 04:49:52 PM »
Here is my current attempt code.
#include "lib_aci.h"
#include "aci_setup.h"
#include "uart_over_ble.h"
#include "services.h"
#include <Adafruit_BLE_UART.h>


#define BLE_DEBUG false

//The Arduino pins used by the GPS module
static const int GPS_ONOFFPin = A3;
static const int GPS_SYSONPin = A2;
static const int GPS_RXPin = A1;
static const int GPS_TXPin = A0;
static const int GPSBaud = 4800;
// The TinyGPS++object
TinyGPSPlus gps;
// The GPS connection is attached with a software serial port
  SoftwareSerial Gps_serial(GPS_RXPin, GPS_TXPin);

//Debug output adds extra flash and memory requirements!
#ifndef BLE_DEBUG
#define BLE_DEBUG true
#endif

#if defined (ARDUINO_ARCH_AVR)
#define SerialMonitorInterface Serial
#elif defined(ARDUINO_ARCH_SAMD)
#define SerialMonitorInterface SerialUSB
#endif


uint8_t ble_rx_buffer [21];
uint8_t ble_rx_buffer_len = 0;
uint8_t ble_connection_state = false;
#define PIPE_UART_OVER_BTLE_UART_TX_TX 0


//when using this project in the Ardunio IDE,delete he following include and
rename UART.h to UART.ino
#include "UART.h"

void setup() {
  SerialMonitorInterface.begin(9600);
  BLEsetup();
  //Init the GPS Module to wake mode   
  pinMode(GPS_SYSONPin, INPUT);
  pinMode(GPS_ONOFFPin,OUTPUT);
  digitalWrite(GPS_ONOFFPin, LOW);
  delay(5);
  if(digitalRead(GPS_SYSONPin) == LOW)
  {
    //Need to wake the module
    digitalWrite(GPS_ONOFFPin,HIGH);
    delay(5);
    digitalWrite(GPS_ONOFFPin, LOW);
  }
  Serial.begin(9600);
  //Open the GPS serial port
  Gps_serial.begin(GPSBaud);
  Wire.begin();
}
 
 
void loop() {
  while (Gps_serial.available()>0)
  gps.encode(Gps_serial read.read());
  aci_loop();//Process any ACI commands or events from the NRF8001-main BLE handler, must run often. Keep main loop short.
  if (ble_rx_buffer_len) {//Check if data is available
    SerialMonitorInterface.print(ble_rx_buffer_len);
    SerialMonitorInterface.print(" : ");
    SerialMonitorInterface.println((char *)ble_rx_buffer);
    ble-rx-buffer_len=0;//clear after reading
 }

    String msg = String(gps.location.lat(), 3);
    msg += ":";
    msg += String(gps.location.lng(), 3);
    msg += ":";
    msg += String(gps.altitude.value());
    ble_rx_buffer_len = 0;
  }
 if (SerialMonitorInterface.available()) {Check if serial input is available to send
    delay(10);//should catch input
    uint8_t sendBuffer[21];
    uint8_t sendLength = 0;
    while (SerialMonitorInterface.available() && sendLength < 19) {
      sendBuffer[sendLength] = SerialMonitorInterface.read();
      sendLength++;
    }
    if (SerialMonitorInterface.available()) {
      SerialMonitorInterface.print(F("Input truncated, dropped: "));
      if (SerialMonitorInterface.available()) {
        SerialMonitorInterface.write(SerialMonitorInterface.read());
      }
    }
    sendBuffer[sendLength] = '\0';
    sendLength++;
    if (!lib_aci_send_data(PIPE_UART_OVER_BTLE_UART_TX_TX, (uint8_t*)sendBuffer, sendLength))
    {
      SerialMonitorInterface.println(F("TX dropped!"));
    }
  }
  if (millis() > 5000 && gos.charsProcessed() > 10){
    Serial.println("ERROR: not getting any GPS data!");
    Serial.println("GPS stream dump:");
    while(true)   
    }
}
Can you advise errors.
14
Tiny Arcade / Re: Font use on screen
« Last post by HunterHykes on August 09, 2018, 02:30:59 PM »
If need be, an easy fix could be done by creating sprites for your text and loading in the numbers in that way. You would load in the score sprites just like any other sprite by adding it to the spriteList[] array. You would have a sprite for the ones place, tens place, hundreds place, and so on. Then, depending on the value of the score variable, you would make the sprite point to the proper bitmap.

I hope this helps.

-Hunter
15
Tiny Arcade / Re: Font use on screen
« Last post by dulsi on August 09, 2018, 09:00:10 AM »
Viobyte displays a score without using the font. I added in an image of numbers at 4x4 size. For color monster I needed a full font. I found one on opengameart.org. It has more complicated drawing code so viobyte might be easier to understand but you could still use the larger font. 4x4 was needed for viobyte because I wanted the maze to be as large as possible.
16
Tiny Arcade / Re: Font use on screen
« Last post by johnbbq on August 09, 2018, 02:10:43 AM »
Hey Hunter. Thanks for the reply. I looked into it today, but I'm not sure what to do.

I was going to start creating a bitmap font routine to display the scores, but if you guys can give me any pointers on how to use the fonts with the drawbuffer function, that will save me a lot of time. Thank you!

Our second TinyArcade arrived yesterday, and we promptly put it together today :). We are now working on two projects at the same time.
17
General Discussion / Re: GPS Tracker with Bluetooth
« Last post by DimSim1010 on August 08, 2018, 06:13:21 PM »
Hello,
I have looked at all the tutorials regarding the GPS tiny shield and none of them talk about Bluetooth. However, there is a forum post:
http://forum.tinycircuits.com/index.php?topic=1689.0 which I have copied the code and have tried however many errors pop up.
Thanks
18
Tiny Arcade / Re: Font use on screen
« Last post by HunterHykes on August 08, 2018, 12:56:51 PM »
Hi John,

When I looked into your issue myself, I came to the conclusion that the flickering is due to the drawBuffer() function and the display.print() function interfering with one another. If you would like to display the score in this manner, you will have to find a way to do so within the drawBuffer() function.

Personally, I am no expert on the font library. However, with some investigation into their hex values as arrays, you should be able to figure out how each character is represented and possibly work it into the drawBuffer() function. If this seems overwhelming, I can look into the issue myself to see if I can find a solution to your problem.

-Hunter
19
General Discussion / Re: GPS Tracker with Bluetooth
« Last post by lennevia on August 08, 2018, 12:46:26 PM »
Hello DimSim,

There are plenty of arduino tutorials available online that will help you program this school project. Otherwise, you can bring more specific questions to the forum so we can help you along the way.

Thanks,
Réna
20
General Discussion / GPS Tracker with Bluetooth
« Last post by DimSim1010 on August 08, 2018, 02:54:34 AM »
Hello,
I am doing a school project and need some advice. I was doing this tutorial:  https://tinycircuits.com/blogs/learn/tinyduino-gps-tracker-data-logger-tutorial and have managed to do it. I had an idea to use Bluetooth track the NMEA data on my phone. I have bought the Bluetooth Low Energy (ST) and can use by itself. Since I am a student, can you please help by telling me how to program it?
Pages: 1 [2] 3 4 ... 10