chipKIT Lesson: LinkSprite JPEG Camera

LinkSprite JPEG Camera with chipKIT

LinkSprite JPEG Camera digunakan untuk mengambil gambar dan data nya dalam bentuk JPEG. Interface LinkSprite JPEG Camera dengan PIC boleh rujuk PIC Lesson: LinkSprite JPEG Camera.

Data JPEG bermula dengan dua byte 0xFF 0xD8 dan berakhir dengan dua byte 0xFF 0xD9. Memproses data JPEG menggunakan microcontroller sangat kompleks. Oleh itu, menggunakan Visual Basic untuk memaparkan gambarnya.

Berikut adalah videonya.

ChipKIT Source Code

VB source code

One Reply to “chipKIT Lesson: LinkSprite JPEG Camera”

  1. Thank you it is very helpful but when trying to write in C# i get parameter is not valid error. And this how i did it :

    private void timer1_Tick(object sender, EventArgs e)
    int upperBound = richTextBox1.TextLength % 2;
    byte[] ByteArr = new byte[upperBound];
    data = serialPort1.ReadExisting();
    if (data != “”)
    counter = 0;
    if (counter < 7) counter += 1;
    if(counter == 6)
    for (int i = 0; i < (upperBound – 1); i++)
    ByteArr[i] = Convert.ToByte(richTextBox1.Text.Substring(i * 2, 2), 16);
    ByteToImage(pictureBox1.Image, ByteArr);
    pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
    button2.Enabled = true;
    public void ByteToImage(Image NewImage, Byte[] ByteArr)
    MemoryStream ImageStream;
    ImageStream = new MemoryStream(ByteArr);
    try { NewImage = Image.FromStream(ImageStream); }
    catch (Exception ex) { MessageBox.Show(ex.Message); }

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.