I haven't used Arduino for a little while and have tried to get this sketch to work.
Im getting the error:
Arduino: 1.0.6 (Windows 7), Board: "Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328"
sketch_sep24a.ino: In function 'void loop()':
sketch_sep24a:44: error: invalid conversion from 'int8_t' to 'const char*'
sketch_sep24a:44: error: initializing argument 3 of 'void IIC_without_ACK::Char_F6x8(unsigned char, unsigned char, const char*)'
Everything work fine, apart from the line near the bottom causing the issue. I need this changing variable to be displayed on the OLED.
Any help would be appreciated. I've tried various possible solutions but keep getting errors and putting it into an array i guess is a little beyond me.
Many thanks,
#include "NazaDecoderLib.h"
#include <SPI.h>
#include <Wire.h>
#include <IIC_without_ACK.h>
#include "oledfont.c" //codetab
#define OLED_SDA A4
#define OLED_SCL A5
IIC_without_ACK display(OLED_SDA, OLED_SCL);//9 -- sda,10 -- scl
uint32_t currTime, attiTime;
void setup()
{
Serial.begin(115200);
display.Initial();
display.Fill_Screen(0xf0);
delay(2000);
display.Fill_Screen(0x00);
}
void loop()
{
display.Char_F6x8(0,0,"");
display.Char_F6x8(0,1,"GPS Tester");
if(attiTime < currTime)
{
attiTime = currTime + 500000;
display.Char_F6x8(0,1,"Pitch: ");
}
currTime = micros();
// Display attitude at 5Hz rate so every 200000 microseconds
if(attiTime < currTime)
{
attiTime = currTime + 200000;
display.Char_F6x8(0,3,"Pitch: "); //display.Char_F6x8(0,0,NazaDecoder.getPitch());
display.Char_F6x8(0,4,"Roll: "); //display.Char_F6x8(0,0,NazaDecoder.getRoll());
// display.Char_F6x8(40,3,NazaDecoder.getPitch()); // This line is causing the issue
Serial.print("Pitch: "); Serial.print(NazaDecoder.getPitch());
Serial.print(", Lat: "); Serial.print(NazaDecoder.getLat());
Serial.print(", Lon: "); Serial.print(NazaDecoder.getLon());
Serial.print(", Alt: "); Serial.print(NazaDecoder.getGpsAlt());
Serial.print(", Fix: "); Serial.print(NazaDecoder.getFixType());
Serial.print(", Sat: "); Serial.println(NazaDecoder.getNumSat());
}
}