Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Saving Pictures from Feather HUZZAH to IO
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Saving Pictures from Feather HUZZAH to IO

by francis66 on Mon Aug 03, 2020 10:49 am

Hi,

I've been trying to get a project working for months using the IO Home Security learning project as my foundation. My project also uses the learning project for a solar powered setup for my Feather HUZZAH since I do not have a power supply where this will be used (but it's in range of WiFi). The IO Home Security project example jumps over to the Raspberry Pi Zero W and Python programs for snapping pictures which I learned the hard way is a huge drain on battery power even when the Pi is turned off. I learned a bit, but in the end this was a wasted investment for my project since the solar panels can't produce enough juice to keep the Pi powered. So I persisted and bought the Mini TTL Serial JPEG Camera (VC0706) for use with my Feather HUZZAH. With some trial and error I have been able to get the Arduino program to successfully snap pictures and move the JPEG from the Camera to the HUZZAH. I even got it working to convert the image to Base 64 using help from another project I found on Github. I know it's working because if I copy & paste the converted string to my IO picture object and manually Add the Data, the picture appears. What I can't get working is the feed-->save() function using the MQTT client. I get a Stack overflow even when using the smallest image size possible (160x120). Does Adafruit have any examples of how to upload a picture to IO for a Feather HUZZAH?

francis66
 
Posts: 2
Joined: Mon May 13, 2019 9:03 am

Re: Saving Pictures from Feather HUZZAH to IO

by brubell on Wed Aug 05, 2020 11:31 am

What I can't get working is the feed-->save() function using the MQTT client. I get a Stack overflow even when using the smallest image size possible (160x120). Does Adafruit have any examples of how to upload a picture to IO for a Feather HUZZAH?


Ok, let's try a few things. First, for the feed you're saving the image to - is the feed's history turned OFF?

brubell
 
Posts: 1043
Joined: Fri Jul 17, 2015 10:33 pm

Re: Saving Pictures from Feather HUZZAH to IO

by francis66 on Wed Aug 05, 2020 11:49 am

Yes, feed history is turned off. When I followed the IO Home Security series I was able to successfully get the same feed working using the Pi Zero W and Python programs. When I use the Arduino client, even if I try saving the image in string form the program crashes with a stack dump. Example with full string cut out:
feedname->save("/9j//gAkywBSHwAAAA..........");

francis66
 
Posts: 2
Joined: Mon May 13, 2019 9:03 am

Re: Saving Pictures from Feather HUZZAH to IO

by brubell on Fri Aug 07, 2020 9:49 am

You might want to try including these two files, they're from the esp8266 websocket server code - https://github.com/fcgdam/ESP8266-base64

If you're still being presented with a stack dump, you should install the ESPExceptionDecoder and paste the output from the stack trace. I can help you debug more if I have more context:

https://github.com/me-no-dev/EspExceptionDecoder

brubell
 
Posts: 1043
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.