This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf51822 evaluation kit image from camera to BLE

Hi Im electrical engineer student. I am working on nrf51822 evaluation kit and LinkSprite JPEG Color Camera UART Interface. I tried to control the camera to take picture, store in flash then from flash go straight to BLE. I get stuck at storing image to flash. The library in keil folder doesnt provide that much example. Is there anyone have a direction for me to continue this project? Thank you

  • Thanks for fast reply and your patience! The camera takes picture with its smallest resolution: 160x120 which means 10k. I receive the first chunk and the last chunk of the picture which starts with FFD8 and FFD9. It's not right because i want to receive all the chunks, not only the first one and the last one. I receive chunks with logic analyzer. 1 more thing, right at that logic analyzer, i am not sure if the image(in hex digit) is in the board nrf51822 or still in the camera. Sorry, i am a very beginner with ARM and Camera

  • I can't to your question about the camera protocol. You'll need to find the camera specification and understand the transfer protocol it uses to transfer data over uart. JPEG is a compressed image. You won't the picture itself but compressed data bitstream. In order to see the image you need to decode it first. You don't need to do that. Just sent all the data you receive and send it as it over BLE to whatever you use to decode the image. The nRF51 is not fast enough to decode the image in realtime.

  • Many of the jpeg camera modules can buffer the compressed data (some can even store a small ring of compressed frames). So your best bet is to stream the data directly from the uart to the radio and let the camera module act as your buffer.

    The on-chip flash really isn't a good choice for writing something like image data. If you really want to write the images to flash first, then use an external SPI flash (something like the Winbond W25Q80BW is US$0.50/Q1 at digikey).

  • since the minimum size of my image is 4k (160x120) and max is 60k(640x480), i think i just go with the min resolution. As Clem Taylor mentioned, if i dont store the image (i will add Winbond later) and i want to go direct to BLE, what direction should i follow? All the response i receive from the camera right now is though my logic analyzer.

  • First things, put your camera aside for a while. Take UART and other ble examples and get them working. Get a feel of how BLE works. Once you familiar with data transmission over BLE, then you can get back to your camera. There are many examples in the sdk you can look at. If you are using Keil free licence, it is limited to 30KB. This is probably not enough for real work. There are Eclipse based development which is completely free. You look at this Blog site on how to setup up Eclipse based nRF51 development. It also contains many examples you can use, including UART over BLE. embeddedsoftdev.blogspot.ca/.../ehal-nrf51.html

Related