Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: Pi-cromite 5.04.17: Sprites Post ReplyPost New Topic
<< Prev Page of 4
Author
Message << Prev Topic | Next Topic >>
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2115
Posted: 10 June 2018 at 4:09am | IP Logged Quote matherp

Please PM me with your code (including the key) and I'll have a look


Back to Top View matherp's Profile Search for other posts by matherp
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2115
Posted: 10 June 2018 at 10:53pm | IP Logged Quote matherp

Please find attached version 5.4.20 for Stretch

2018-06-10_224938_mmbasicstretch.zip

and for Jessie

2018-06-10_225245_mmbasicjessie.zip

The release includes a new sub command LONGSTRING PRINT [#n,] src%(). This prints the longstring stored in src%() to either a file, a serial port, or the console. This is particularly useful for diagnosing TCP client applications
Back to Top View matherp's Profile Search for other posts by matherp
 
goc30
Regular Member
Regular Member
Avatar

Joined: 12 April 2017
Location: France
Online Status: Offline
Posts: 62
Posted: 11 June 2018 at 9:00am | IP Logged Quote goc30

Hi peter
New version is good for me (i have tested uart port with gps)
I have a small problème with Com2 (pins 7 and 11). some times i receive a bad byte (like 0x0f). I think that pb come from my configuration (i have many problems with rpi3b+ and strech, lot of functions don't work correctly, worst is uart ports).
Back to Top View goc30's Profile Search for other posts by goc30
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 922
Posted: 11 June 2018 at 6:10pm | IP Logged Quote lew247

Peter
One thing I noticed
If you PRINT TIME$ the time is there even without setting it
do you know where it or the Pi gets the time from?

Back to Top View lew247's Profile Search for other posts by lew247
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2115
Posted: 11 June 2018 at 6:32pm | IP Logged Quote matherp

Quote:
do you know where it or the Pi gets the time from?


It is using the system time so if the pi is online it will have been updated from an ntp server
Back to Top View matherp's Profile Search for other posts by matherp
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 922
Posted: 14 June 2018 at 8:23pm | IP Logged Quote lew247

Peter
There's still one bug that's causing the scrolling display
I tested the Pi the other day and left it connected to the power
today I connected to the Pi
ran sudo ./mmbasic
I go the scrolling text

Would it be because mmbasic was already running on the Pi and when I try and run it again it's doing this?



Back to Top View lew247's Profile Search for other posts by lew247
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2115
Posted: 14 June 2018 at 8:35pm | IP Logged Quote matherp

Quote:
Would it be because mmbasic was already running on the Pi and when I try and run it again it's doing this?


Yes. You should always exit the Pi-cromite application (ctrl-Z) before disconnecting the terminal. There is a way of connecting the Pi-cromite application to a pseudo-terminal such that you can then re-connect to the same instance later. Details for this were supplied buy another TBS member and are buried somewhere in the original very long Pi-cromite thread
Back to Top View matherp's Profile Search for other posts by matherp
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 922
Posted: 14 June 2018 at 8:54pm | IP Logged Quote lew247

Thanks Peter

Another question if you don't mind

I've got the data coming from DarkSky perfectly now but I can't figure out how to assign it

I'm hopeless at trying to explain but

With MM and serial input I could use temp2$ = WData$(2) 'temp tomorrow
WData$(2) was the 3rd comma seperated character

With the Picromit I'm using what's in the manual
? JSON$(a(),"currently.icon"), "ICON$"
It works but I cannot use ICON$ later in the program

Is there a way to make it similar to

ICON$ = ? JSON$(a(),"currently.icon")
or ? JSON$(a(),"currently.icon"), = "ICON$"
Back to Top View lew247's Profile Search for other posts by lew247
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2115
Posted: 14 June 2018 at 9:32pm | IP Logged Quote matherp

icon$=JSON$(a(),"currently.icon"):? icon$
Back to Top View matherp's Profile Search for other posts by matherp
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 922
Posted: 14 June 2018 at 10:56pm | IP Logged Quote lew247

Thanks Peter, you're a star
Back to Top View lew247's Profile Search for other posts by lew247
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 922
Posted: 15 June 2018 at 11:15pm | IP Logged Quote lew247

Could anyone tell me why this works with Darksky*
icon$=JSON$(a(),"currently.icon"):? icon$  
PRINT icon$


But does not work with Openweathermap?*
icon3$=JSON$(b(),"icon"):? icon3$
PRINT icon3$


I've tried all variations I can think of including JSON$(b%() as per the manual
and I've also tried main.icon

Edited by lew247 on 15 June 2018 at 11:16pm
Back to Top View lew247's Profile Search for other posts by lew247
 
disco4now
Senior Member
Senior Member


Joined: 18 December 2014
Location: Australia
Online Status: Offline
Posts: 255
Posted: 16 June 2018 at 3:58pm | IP Logged Quote disco4now

Assuming your have captured the data into b%() then the following should pull the icon value from the returned data.

This should be for the forecast query and to get day 0 is list[0]
day 1 is list[1] etc.
icon3$=JSON$(b%(),”list[0].weather[0].icon")

This is for current weather query
icon$=JSON$(b%(),“weather[0].icon”)

If you put the query into your browser and look at the returned data helps work out it structure and what the key values need to be.

Regards
Gerry

Edited by disco4now on 16 June 2018 at 3:59pm
Back to Top View disco4now's Profile Search for other posts by disco4now
 


If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Search the forums using Google.
<< Prev Page of 4
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.0957 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.1