I have an image saved as “field,png”. What would I use to make the brain print that image at (0,0)?
I tried Brain.Screen.setCursor(0, 0); Brain.Screen.print( “field.png”); but it did not work.
I have an image saved as “field,png”. What would I use to make the brain print that image at (0,0)?
I tried Brain.Screen.setCursor(0, 0); Brain.Screen.print( “field.png”); but it did not work.
Brain.Screen.drawImageFromFile(“field.png”, 0, 0);
make sure it’s no larger than than 480x240
Detail: 240 vs 272 high?
You always have the header with program runtime etc. which you need to account for.
You didn’t mention where you had saved the image. To clarify, put it in the parent directory of the micro SD card in the brain. To my knowledge, there is no easy way to do this without a micro SD card.
is there any way to do this without an sd card
Probably, but if you asking, it may be more complicated than you want it to be.
Also, would help to have specifics of what you want to accomplish. For example, drawing field layout might be accomplished with drawing functions and not need PNG data.
Others will probably alert you this topic has been resolved, and is over a year old. So might be better to reframe a new topic …
My plan was to draw an image of the spin up field. Then create buttons and when you press on one of those four buttons it will run the auton i made for that position on the field. I could draw the field through drawing functions but to me a picture seemed more simple than drawing rectangle by rectangle.
I had approached the Autonomous Selection problem by adapting James Pearman’s autonomous selection using buttons example. I then was going down the route of having graphical interface of field to select robots starting position… at the time I determined it could all be done using drawing of field vs using PNG image of field. that was at the time of the Student Centered approach document - and I figured it was deeper example than teams were ready for.
Long winded way of saying, for sure use drawing tools - it aligns better with computer graphics concepts that are well understood and interfaces with user input technologies well.
My recommendation is to pursue drawing the field using drawing tools - in the long run it will be easier on all fronts.
Please, check out this topic: