Posts

Showing posts from March, 2021

MicroPlot on the PyPortal - progress and frustration

Image
Update: I got a fix within minutes of posing the problem on the Adafruit discord channel! Here's the correct bitmap: The problem is now solved, MicroPlot now runs well on the Adafruit PyPortal and  Clue as well as the Pimoroni Pico Explorer base, but I've been tearing my hair out trying to solve a problem saving bitmaps. The bitmap problem Here's a screenshot of a display on the PyPortal together with the bitmap file which should show what's on the screen. I could not work out what's going wrong. The code creates the plot and then uses the screenshot code that Adafruit provides. import math from plotter import Plotter from plots import LinePlot import board import digitalio import busio import adafruit_sdcard import storage from adafruit_bitmapsaver import save_pixels def plot(): sines = list(math.sin(math.radians(x)) for x in range(0, 361, 4)) lineplot = LinePlot([sines],'MicroPlot line') plotter = Plotter() lineplot.p