Hi, I’m wanting to access a webpage (it’s actually a txt page) and I want to pick out a particular numerical value within the text and then use that to control a neopixel strip. The problem I’m having is that although I can do this in Python I can’t find a way of doing it in MicroPython or indeed in Arduino IDE, which are what I assume I would use with an ESP8266 device. The code I use in Python is
f = urllib.request.urlopen(“http://aurorawatch.lancs.ac.uk/api/0.1/activity.txt”)
lines = f.readlines()
x = lines
n = x[32:-7]
a = float(n)
z = int(a)
Can anyone please tell me how I could achieve this in Micropython or Arduino IDE?