Hi,
I now get 4x lines on 5110, with GPS updating.
On line 4 it shows AL
It won't accept 'read_data' because it isn't a STRING.
Here are the two relevant sections:
'#########################################################################
Const r_data = 0xf9 'READ ADDR lsb from BMP280
Dim read_data As Byte
'##########################################################################
Disable High
Disable Low
Include "fontsml.bas" 'This 'FONT' file nust be in the same folder as this program code
'''Include "get_dir.bas" 'This 'COMPASS' file nust be in the same folder as this program code
Include "get_neo.bas" 'This 'GPS' file nust be in the same folder as this program code
Include "get_hpa.bas" 'This 'ALTIMETER' file nust be in the same folder as this program code
Include "get_lcd.bas" 'This '5110 LCD' file nust be in the same folder as this program code
msg1 = ""
Hseropen 9600
Hserout "Ready!", CrLf
start:
'do a lcd Reset
Gosub rst_lcd '5110 states very early RESET is important
SPIPrepare
Gosub cmd5110 'init lcd
WaitMs 10
Call clear()
main:
'########################################################################
Gosub get_hpa 'Reads BMP280[[KEEP INSIDE MAIN TILL WORKING]]
Gosub get_neo 'COMMENT OUT AND ALTI SHOWS
PORTD.5 = 0 'CHIP SELECT ON[hpa] [SPI]
SPIPrepare
SPICSOn
SPISend 0xf9
SPIReceive read_data
SPICSOff
PORTD.5 = 1 'CHIP SELECT OFF[hpa][SPI]
msg1 = msg1
PORTD.4 = 0 'CHIP SELECT 5110 ON
Gosub get_lcd 'WRITES TO LCD
PORTD.4 = 1 'CHIP SELECT 5110 OFF
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
'From OSH
'For addr = 0 To 10
'SPICSOn
'SPISend 0x03
'SPISend addr
'SPIReceive data
'SPICSOff
'Lcdcmdout LcdClear
'Lcdout "Read From EEPROM"
'Lcdcmdout LcdLine2Home
'Lcdout "(", #addr, ") = ", #data
'WaitMs 500
'Next addr
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
'#######################################################################
[[[IN GET_NEO]]]
'PORTD.6 = 0 'CHIP SELECT ON
'Gosub get_dir 'READs COMPASS
'PORTD.6 = 1 'CHIP SELECT OFF
msg1 = "TIM=" + strtim '5110
Call wr_msg(0, 0, msg1)
msg1 = "LAT=" + strlat '5110
Call wr_msg(0, 1, msg1)
msg1 = "LON=" + strlong '5110
Call wr_msg(0, 2, msg1)
msg1 = "AL=" '+ read_data 'stralt'5110
Call wr_msg(0, 3, msg1)
Goto main
C.