Yun reading remote bitmaps. Where to start?

Hi, all. I'm trying to understand how I should approach this project. I've experience with Arduino & shields, but I'm kind of lost on this one:

I'm trying to turn a Yun into a device that repeatedly

  • Reads a (new) remote bitmap from a web server
  • Saves the bmp to the Yun's SD card
  • Analyses the bmp from the SD card, recording the color values of each pixel (so I can alter colors before displaying)

I've got an OLED Breakout Board connected to the board for verifying. I've seen the TFT examples, and the SD examples, but something tells me I need a script on the Linino side. Any suggestions on the most efficient way to do this? I'm not very experienced in Linux, so I'd not even sure what scripting language I'd need on the Linino side, if that's the suggested route.

-Vince

Hi Vince,

well you have to decide which programming language you're going to use: python, php, java... all have libraries or functions to retrieve files from internet (= download your image) and to open/analyze images.

for example, with PHP you can use:

cURL to download the image:

GD to get pixels' color:
http://www.php.net/manual/en/function.imagecolorat.php

bye

Awesome. Thanks so much! I didn't even know PHP was an option on these boards, but I guess I should have known.

-Vince

yes! I love PHP and using the php-cli module you can even run "shell scripts" written in PHP XD