Show Posts
Pages: [1] 2 3 ... 15
1  Using Arduino / General Electronics / Re: i2c camera on: March 25, 2014, 08:53:32 pm
Well I got the ov7670 working on the arduino in fact I create the long thread. You could use an arduino if you want it will be slow.
2  Using Arduino / Storage / Re: How to save pictures from a camera to an SD card on: February 09, 2014, 10:15:34 pm
Yes that is correct. I used SPI ram to take a 640x480 image and save it to an sd card read http://forum.arduino.cc/index.php?topic=159557.0
Or you could buy an ov7670 with fifo. That is even better that SPI. Also though I have made recent progress with the MT9D111 it supports jpeg you can get it to output a 1600x1200 jpeg image that takes about 60kb. Also if you do end up with a cmos sensor capable of only uncompressed output it is better that you store the raw bayer data. Instead of 640x480x2 (yuv422 or rgb565) it is only 640x480 bytes or if it has 10bit output and you use that it would still be only 640x480x10/8 bytes which is still smaller and it is higher quality.
3  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: January 21, 2014, 09:37:05 pm
@Fadik you are missing bytes or have configured the camera wrong. Please post the code you use to get bytes from the camera.
@sakeear After the button is pressed you just need to put the code that saves the image in a loop and in that loop make sure to "increment" the file-name so you don't overwrite the same image.
4  Using Arduino / Programming Questions / Re: Why put something in a class and use it only once? on: January 20, 2014, 04:33:06 pm
Still the TFT class encapsulates all the logic of the TFT so that it easier to search for problems in the code.
divide et impera - old latin saying

and yes a Class can always be coded otherwise e.g. a cpp file
and yes optimizations can kill any good design principle
You can also just create C functions that do the same thing this is what I did with that library https://github.com/ComputerNerd/arduino-camera-tft/blob/master/TFT.c
5  Using Arduino / Programming Questions / Re: SRAM cost of using PROGMEM on: January 20, 2014, 03:31:14 pm
Well actually if you want to store a large constant array you will save SRAM by using PROGMEM. When you have a const array it is stored in ram unless you specify that it should be stored in flash.
Personally when I want to use a constant variable I just let the pre-processor do the work by using macros instead of const variables.
6  Using Arduino / Programming Questions / Re: Why put something in a class and use it only once? on: January 20, 2014, 03:19:41 pm
Here is a good example http://www.seeedstudio.com/wiki/File:TFT_Touch_Shield_libraries.zip it is coded in such a way that you can have only one tft screen because it uses port manipulation to constant addresses. So there is no point to put it in class because it will only be used once. Also on the Arduino uno which this library supports you don't have enough pins to have more than one tft screen hooked up. You would need a demultiplexer or io expander or shift register which the library does not support and I think that the user of the library should add those things not the library author. The print functions are in class because they can be used more than once. The print functions are inherited into the Serial class which this does make sense. Other classes can re-use the print functions if needed. What I am talking about is libraries that will be used only once and cannot be re-used. Also high abstract level is not always a good thing if there are performance costs of having it. If the performance is greater than or equal to a lower abstract design than please do it but otherwise don't. Also you don't have to put something in a class do re-use it in different programs. Just put related functions in different files. However if you go that route I recommend you enable link time optimizations. I use avr-gcc directly by the way I don't use the arduino "ide". In the arduino "ide" you don't have control over the CFLAGS.
7  Using Arduino / Project Guidance / Re: Can I use an Atmega in my project on: January 20, 2014, 12:27:14 pm
(2) Bluetooth connectivity (see item 1)
(3) 32 bit analog data.
Just get a 32-bit processor like ARM or PIC32 or AVR32 or whatever you feel is best but I think that you should give some flexibility this is because:
I normally install a $10k to $15k PLC panel to do what I think can be done with a micro.
If you are replacing something normally costing that much the extra $1-3 dollars is not going to be noticed and will be seen as a drop in the bucket however the performance you gain will be noticed a lot. You can use an atmega if you want and it will do it but I am just saying that there is no reason to cheap out for an 8-bit processor. Also you can buy 32-bit micro-controllers with built-in Bluetooth so you may actually save money. By googling Bluetooth Soc ARM I found this in about one minute http://www.mouser.com/ProductDetail/Nordic-Semiconductor/nRF51822-QFAA-R7/?qs=sGAEpiMZZMvQqVCO1QUkez7sIZGL4lOYjddp8D7wMfY%3d
8  Using Arduino / Sensors / Re: Arduino Mega max number of Analog Sensors Confirmation? on: January 20, 2014, 12:17:10 pm
Actually you can have more than 16 you could either use an analog multiplexer or you can get an external ADC. I found this with just one minute on google. http://cds.linear.com/docs/en/datasheet/1391fas.pdf What it does is it takes 8 inputs and has 1 output so what you can select which input gets sent to the output. This is called a multiplexer.
9  Using Arduino / Programming Questions / Why put something in a class and use it only once? on: January 20, 2014, 12:11:58 pm
One strange thing I could never understand about you programmers who say you program for Arduino is when you make a library why do you always feel the need to put everything in a class only to use the class once in your program. I hardly ever use libraries I just read the datasheet and and write my own code that does what I need it to do and only what I need it to do. I have found by doing this my program takes less flash spaces and my code is more efficient.
10  Using Arduino / Sensors / Re: OV7670 - Without FIFO - Reading Snapshot from Arduino on: January 20, 2014, 12:01:52 pm
I have provided a lot of sample code. You can read my long thread the link was posted above.
11  Topics / Robotics / Re: OV7670 camera image to pc on: January 19, 2014, 07:47:47 pm
Please don't cross post the same thing http://forum.arduino.cc/index.php?topic=211179.0
12  Using Arduino / Sensors / Re: OV7670 - Without FIFO - Reading Snapshot from Arduino on: January 19, 2014, 07:44:49 pm
XCLK is easy to generate just use PWM to generate an 8mhz clock. No need to mess with fuse bits or anything The AVR hardware has a mode of PWM that lets you output frequencies using this formula F_CPU/((x+1)*2).
13  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: January 19, 2014, 01:04:21 pm
Ok you tried the program but it seems as though you tried nothing to fix it. Please add fast PWM code to the program read the atmega328p datasheet if you are unsure of how to do so. Also I don't like that program anymore (the ones on pastebin). You should checkout https://github.com/ComputerNerd/arduino-camera-tft I am working on the ov7670 with the stm32f4 discovery but have been extremely busy with non-electronics stuff. I would rather do this but can't sorry.
14  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: January 19, 2014, 10:06:26 am
You DON'T need to change the fuse bits it is a waste of time. Just use the fast PWM mode it will output an 8mhz clock.
15  Using Arduino / Storage / Re: Is there a SRAM extension Shield? on: January 18, 2014, 05:04:36 pm
As far as I am aware this is impossible due to the fact that the arduino DUE does not even have all pins broken out. It is quite a shame that they would make such an expensive product and not even break out all pins.
Pages: [1] 2 3 ... 15