Coder Social home page Coder Social logo

arduino's People

Contributors

aaronbuchwald avatar annakin4 avatar arducam avatar arducamsupport avatar avamander avatar bovi avatar gohai avatar i-am-bigmike avatar iotpanic avatar ivankravets avatar jeff-arducam avatar jgromes avatar ljp-while avatar orion434 avatar per1234 avatar robertmaxwilliams avatar uctronics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino's Issues

Arducam mini 5mp + ESP8266

I'm trying to use an Arducam mini 5MP with the websocket example and it doesn't run for me.

I upload to my esp8266 the following program but It does not run well.
https://gist.github.com/labajo/99a2be6098db086430bf927b4275f6a8

I cannot see a special trace to find out the problem.

SPI1 interface Error!
OV5642 detected.


Connecting to iMac

WiFi connected
Server started
192.168.2.3
Client connected
Analyzing request headers
Got Line: GET / HTTP/1.1
Got Line: Host: 192.168.2.3
Got Line: Connection: Upgrade
Got Line: Pragma: no-cache
Got Line: Cache-Control: no-cache
Got Line: Upgrade: websocket
Got Line: Origin: null
Got Line: Sec-WebSocket-Version: 13
Got Line: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
Got Line: Accept-Encoding: gzip, deflate, sdch
Got Line: Accept-Language: es-ES,es;q=0.8
Got Line: Sec-WebSocket-Key: KNtP+FRULpiEevBrx1imSA==
Got Line: Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Got Line: 
Websocket established
capture

Could you help me?

SPI Interface error with CC3200 and ArduMini 2MP (OV2640)

My problem is that I'm getting different read values than what I am writing:

If I write "1010101" I get back "110011" which results in the Interface error.
Getting close, just need some advice.

SPI Read Error

"The ArduCAM SPI slave interface is fixed SPI mode 0 with POL = 0 and PHA = 1."

This is confusing to me, for the CC3200 mode 0 is POL = 0, PHA = 0. I have tried both mode 1 and mode 0 and still no success with correct read. I get more consistent results with POL=0 and PHA=0 of course it is still wrong, reading '11000111'.

Problem with ArduCam (OV5642) !!!!!!

Dear Sir,
I purchase arducam OV5642 last week.
Since the time I connected it, I keep on getting the "SPI Interface Error" evrytime I run the Host application for PC console.
I have not been able to see any image whatsoever.

I am new to arduino and thus wanted to know what does the error exactly mean? What is the actual problem? Is something wrong with the Arducam or the code or the arduino board itself (Uno R3).
I have tried all the connections and solutions you provided previously in the forum with no luck.

I would be highly obliged if you could please help me solve this problem.
Thank you.

Arducam Mini with Teensy 3.2

Thank you for your product. I recently tested Arducam with teensy 3.2, but I faced with some errors. Since I'm not expert in the topic I need some help. When I compiled the ArduCAM_Mini_2MP_TimeElapse2SD code, I encountered below error. I used Teensyduino to compile the code. I think there is something wrong with itoa.h library.

If you can help I will appreciate. Thanks.

Arduino:1.6.8 (Mac OS X), TD: 1.28, Kart:"Teensy 3.2 / 3.1, Serial, 96 MHz optimized (overclock), US English"

Derleme seçenekleri değiştirildi, tümü yeniden derleniyor.
In file included from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.h:195:0,
from /Applications/Arduino.app/Contents/Java/libraries/ArduCAM-teensysupport_notoriginal/examples/mini/ArduCAM_Mini_2MP_TimeElapse2SD/ArduCAM_Mini_2MP_TimeElapse2SD.ino:17:
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/HW_AVR_SPI_defines.h:34:0: warning: "pgm_read_word" redefined [enabled by default]

define pgm_read_word(data) data

^
In file included from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/WProgram.h:11:0,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Arduino.h:1,
from /var/folders/m5/9v5cfd797hx_1mhvxhtlr6th0000gn/T/build08917ada96b34ff66407c8962bdf5b7d.tmp/sketch/ArduCAM_Mini_2MP_TimeElapse2SD.ino.cpp:1:
/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/avr/pgmspace.h:80:0: note: this is the location of the previous definition

define pgm_read_word(addr) ((const unsigned short )(addr))

^
In file included from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.h:195:0,
from /Applications/Arduino.app/Contents/Java/libraries/ArduCAM-teensysupport_notoriginal/examples/mini/ArduCAM_Mini_2MP_TimeElapse2SD/ArduCAM_Mini_2MP_TimeElapse2SD.ino:17:
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/HW_AVR_SPI_defines.h:35:0: warning: "pgm_read_byte" redefined [enabled by default]

define pgm_read_byte(data) *data

^
In file included from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/WProgram.h:11:0,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Arduino.h:1,
from /var/folders/m5/9v5cfd797hx_1mhvxhtlr6th0000gn/T/build08917ada96b34ff66407c8962bdf5b7d.tmp/sketch/ArduCAM_Mini_2MP_TimeElapse2SD.ino.cpp:1:
/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/avr/pgmspace.h:79:0: note: this is the location of the previous definition

define pgm_read_byte(addr) ((const unsigned char )(addr))

^
ArduCAM_Mini_2MP_TimeElapse2SD: In function 'void loop()':
ArduCAM_Mini_2MP_TimeElapse2SD:82: warning: unused variable 'n'
static int n = 0;
^
ArduCAM_Mini_2MP_TimeElapse2SD:125: warning: 'temp_last' may be used uninitialized in this function
while ( (temp != 0xD9) | (temp_last != 0xFF))
^
In file included from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.h:195:0,
from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp:53:
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/HW_AVR_SPI_defines.h:34:0: warning: "pgm_read_word" redefined [enabled by default]

define pgm_read_word(data) *data

^
In file included from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/WProgram.h:11:0,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Arduino.h:1,
from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.h:194,
from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp:53:
/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/avr/pgmspace.h:80:0: note: this is the location of the previous definition

define pgm_read_word(addr) ((const unsigned short )(addr))

^
In file included from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.h:195:0,
from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp:53:
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/HW_AVR_SPI_defines.h:35:0: warning: "pgm_read_byte" redefined [enabled by default]

define pgm_read_byte(data) *data

^
In file included from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/WProgram.h:11:0,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Arduino.h:1,
from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.h:194,
from /Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp:53:
/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/avr/pgmspace.h:79:0: note: this is the location of the previous definition

define pgm_read_byte(addr) ((const unsigned char *)(addr))

^
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp: In member function 'int UTFT::bus_write(int, int)':
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp:103:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp: In member function 'void UTFT::printNumF(double, byte, int, int, char, int, char)':
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp:835:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0; i<sizeof(st); i++)
^
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp:845:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=1; i<sizeof(st); i++)
^
/Applications/Arduino.app/Contents/Java/libraries/UTFT4ArduCAM_SPI/UTFT_SPI.cpp:851:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0; i<sizeof(st); i++)
^
/var/folders/m5/9v5cfd797hx_1mhvxhtlr6th0000gn/T/build08917ada96b34ff66407c8962bdf5b7d.tmp/core/core.a(nonstd.c.o): In function ltoa': /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/nonstd.c:37: multiple definition ofultoa'
/var/folders/m5/9v5cfd797hx_1mhvxhtlr6th0000gn/T/build08917ada96b34ff66407c8962bdf5b7d.tmp/core/core.a(itoa.c.o):/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/itoa.c:156: first defined here
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: Disabling relaxation: it will not work with multiple definitions
/var/folders/m5/9v5cfd797hx_1mhvxhtlr6th0000gn/T/build08917ada96b34ff66407c8962bdf5b7d.tmp/core/core.a(nonstd.c.o): In function dtostrf': /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/nonstd.c:59: multiple definition ofltoa'
/var/folders/m5/9v5cfd797hx_1mhvxhtlr6th0000gn/T/build08917ada96b34ff66407c8962bdf5b7d.tmp/core/core.a(itoa.c.o):/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/itoa.c:101: first defined here
collect2: error: ld returned 1 exit status
Error compiling for board Teensy 3.2 / 3.1.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Save captured image to computer

Hi,

I am currently searching for a way to capture an image with the ArduCAM and transmit it over Radio Frequency back to a computer. Is there a way to save the captured images directly to a file on the computer without using the host application? I am using this as an intermediate step in solving my problem, but I have not found a way to get the file on the computer without using an SD card. Does this require the use of an SD card? I am trying to find the best way to approach this problem, and I would appreciate any help and advice.

Thank you!

4 Mini Camera Adapter I2C Bus

I have two questions about the 2MP Mini Camera and the 4 Mini Camera Adapter Board.

  1. The 2MP MiniCam Hardware App note (http://www.arducam.com/downloads/shields/ArduCAM_Mini_2MP_Camera_Shield_Hardware_Application_Note.pdf) says that addresses 0x60 and 0x61 are used to write/read from the sensor? I looked at the code but could not find where these are set? Can you please point me to the file and line where I may find this.
  2. On the 4 MiniCam Adapter board, how are you avoiding conflicts on the board? I assume all the minicam's have the same I2C address, or is there a I2C MUX on the board? Are the schematics for the adapter board available?

SPI Error with ArduCam-Mini and Arduino Due

Hello,

I am receiving "SPI Interface Error!" when using the ArduCam-Mini with Arduino Due. Can you please confirm the correct pin configuration for this board and if there are any known software issues?

I am currently using:
SCL1
SCA1
GND
+5V
SPI Header SCK
SPI Header MISO
SPI Header MOSI
Pin 10

Many thanks

ArduCAM mini with 4 Cameras Adapter Board SD card error

Hi,

I have been working with a normal ArduCAM shield before, and first of all I am very happy that it exists!
I have switched to an ArduCAM mini OV2640 now, because I want to make a smaller device that is more flexible. As I wanted to do some experiments with multiple cameras as well, I bought the 4 Cameras Adapter Board.

I have been able to get the combination running (1 ArduCAM mini with the adapter board) through the software you provided. However, my next step is to save pictures on the SD card. For that, I am trying to run the example code ArduCAM mini 2MP TimeLapse 2SD, bot on an Arduino UNO and an Arduino Mega 2560. On both boards it gives me the message 'SD card error' though.

Do you know what might be causing this problem and how I might solve it? At the moment I attached the board directly to the Arduino without extra wires.

Thank you!

WDT Trip / wiring for "Arducam Mini + ESP8266 Capture Demo.ino"

Sorry if it's a dumb question, the module obviously isn't recognized, I'm using same wiring as the ArduCAM_Mini_OV2640_websocket_server.ino example

I'm sure I missed something simple, please school me :)

  • cheers!

Serial:

ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1264, room 16 
tail 0
checksum 0x42
csum 0x42
~ld
ArduCAM Start!
Can't find OV2640 module!

Soft WDT reset

ctx: cont 
sp: 3fff2bf0 end: 3fff2e00 offset: 01b0

>>>stack>>>
3fff2da0:  3fff2e4c 3fff12c8 3fff2e4c 40206f79  
3fff2db0:  00000000 00000000 00000000 00000000  
3fff2dc0:  00002642 00000000 00000000 00000000  
3fff2dd0:  00000000 00000000 00000000 3fff1dd0  
3fff2de0:  3fffdc20 00000000 3fff1dc8 4020ae9a  
3fff2df0:  00000000 00000000 3fff1de0 40100114  
<<<stack<<<

Issue getting capture done (camera write FIFO done flag)

Hello,

For a class project, we're trying to interface with the 2MP Arducam Mini through a Raspberry Pi using bare metal programming. We have working I2C and SPI drivers and are attempting to get any kind of image data from the camera. To guide us, we've heavily examined your code for the Arduino, as we assumed it'd be closer to the bare metal programming we're doing than using your code for the Raspberry Pi with Linux. (ArduCAM_SPI_OV2640_FIFO_UART.ino) Using an Arduino, we modified it to print BMP. It confirms that the capture is done and successfully dumps the values to the serial monitor.

Our problem is that we can't seem to get a capture done from the camera. Here's what we can get:

  1. We can successfully check the SPI communications to the camera by querying the test register 0x00 with any value, and we can read the same value back
  2. We can read the ArduChip version through the 0x40 register and get the version (0x40) back.
  3. We set the mode to MCU to LCD mode by writing 0x00 to 0x02. It's listed as reserved in the manual, but we noticed this was done in your code so we tried it anyway.
  4. We can read the sensor address through i2c successfully
  5. We can successfully write the long list of commands in ov2640_regs.h, and we're writing the correct commands for Bitmap.
  6. We then flush the fifo, clear the fifo, and start a capture. We've confirmed that we're writing the same values as your code (0x84,0x01 0x84,0x01 0x84,0x02)
  7. We then write 0x41, 0x00, and read back the value in this register. In your code, it takes approximately 20-30 reads before capture is complete. Our code never reaches that point. Your code returns numbers like 0x01 until it hits 0x08 or 0x09 which has the done bit set (bit 3), our code returns 0x40, sometimes 0x00 or 0x044

Do you have any insight as to why we can't get a capture done? What do the other bits correspond to in 0x41? We've spent 20+ hours debugging this with a logic analyzer to confirm that our SPI and I2C work, and we're writing the same addresses and values as your code does. We've stepped through your code and made sure to send identical commands. The project is due in a few days so a speedy reply would be appreciated.

As an aside, we notices that flush_fifo() and clear_fifio_flag() are identical functions, is there a reason to send this command twice?

No output on LCD screen after uploading.

Hello. I purchased the Arducam RevC+ shield and OV5642 5MP camera module recently. I connected it to the Arduino Uno R3 but after compiling the code in the 1.5.5r-2 IDE, I got nothing on the LCD screen. I also noticed that the UTFT_SPI and itoa were not highlighted in orange like the other library file names in the #include directives in the early lines of the code, yet these files exist in the libraries folder of the compiler. I'm not sure what the problem is, especially after the code can successfully be compiled and uploaded to the arduino. I'd be most grateful for any help with this.

Windows source code and/or description for the ArduCAM_4CAM.exe

Is there a description of the code used to pull the picture data from the ArduCAM-M-5MP?

I downloaded the code from GitHub. The source code didn't seem to be provided.

It seems that the resolution is 320x240 and not anything close to the resolution of the 5MP camera with the supplied executable: ArduCAM_4CAM.exe 413
Selecting different resolutions didn't seem to change the image quality.

image browsing from sd card

hello
can you give me code works with arducam rev c
can show sdcard saved image on web browser ?
pleas help

my project is
to capture photo using pir sensor (As trigger ) and save the photos to sd card (as in some examples)
and show this photos in web browser

SPI Issues with ArduCAM Mini

I would like clarification on how to properly interface with the ArduCAM mini after reading the documentation. I am attempting to integrate it into an embedded system with an LCD, SD card, and an IR camera. I am using a Teensy MCU. I have encountered major issues attempting to capture an image directly to an SD card with this system. I can see by other issue posts that I am not alone in this.

What are the SPI settings to properly communicate with the device? In the Arduino example code the SPI bus is never configured. Looking at the documentation for the hardware application note I find this: "The ArduCAM SPI slave interface is fixed SPI mode 0 with POL = 0 and PHA = 1." That information is contradictory since POL=0 and PHA=1 are defined as SPI mode 1(https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Mode_numbers). Is it mode 1 or 0? Is it MSB of LSB first? What clock speeds will it work with? I would like to use transactional SPI but given the ambiguity in the documentation it has been difficult to implement.

Operating the device at 5V adds significant noise to my system. Any device on it's MOSI line has its communication distorted greatly. Looking at the SPI signals(CS, MISO, MOSI) on an oscilloscope, I see that the device's signal low is at 2V(the device is sourcing current) and not 0V. This problem is not present when operating the device at 3.3V or lower voltages. How is its voltage translation implemented? Is it using a clamp diode? This noise is a source of distress because it makes it impossible to use another device on the same bus as the Arducam.

In the ArduCAM library, are the functions CS_LOW() and CS_HIGH() just enabling and disabling the chosen chip select for the device? My system has a decoder so I have to modify the library myself, but I am unclear what is being done with the "cbi(P_CS, B_CS)" and "sbi(P_CS, B_CS)" commands.

Distorted image when saving to SD Card

Hi, sir. good day. I have a problem regarding the OV2640 Arducam Mini. When capturing a snapshot and saved it to SD, I got an output image like this. I need help very urgent. I hope you can give some advice on my concern. Regards!
10

and btw, here is the code(modified a bit according to use)

include <Adafruit_CC3000.h>

include <ccspi.h>

include <SPI.h>

include <string.h>

include "utility/debug.h"

include "RTClib.h"

include <SD.h>

include <Wire.h>

include <Thread.h>

include <ArduCAM.h>

include "memorysaver.h"

define ADAFRUIT_CC3000_IRQ 3

define ADAFRUIT_CC3000_VBAT 5

define ADAFRUIT_CC3000_CS 10

Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER);

define WLAN_SSID "#"

define WLAN_PASS "#"

define WLAN_SECURITY WLAN_SEC_WPA2

define IDLE_TIMEOUT_MS 3000

define WEBSITE "192.168.10.100"

define WEBPAGE "#"

define SD_CS 4

define BMPIMAGEOFFSET 66

define SPI_CS 53

const int pirPin = 48;
uint32_t ip = 3232238180;

ArduCAM myCAM(OV2640,SPI_CS);
RTC_DS1307 rtc;

void setup() {
uint8_t temp;
uint8_t vid,pid;
#if defined (AVR)
Wire.begin();
#endif
#if defined(arm)
Wire1.begin();
#endif
Serial.begin(115200);
Serial.println("Program Start!\n");

//Initialization of SD Card
Serial.println(F("Initializing SD Card!"));
if (!SD.begin(SD_CS)) {
Serial.println(F("Initialization failed!\n"));
while(1);
}
/*
Serial.println(F("Initialization done!\n"));
//Initializing RTC
Serial.println(F("Initializating RTC!"));
if (!rtc.begin()){
Serial.println(F("Failed to Initialize RTC!\n"));
}
//rtc.adjust(DateTime(F(DATE), F(TIME)));
Serial.println(F("Initialization of RTC sucessful!\n"));
/
pinMode(SPI_CS, OUTPUT);
/

pinMode(ADAFRUIT_CC3000_CS, OUTPUT);
digitalWrite(SPI_CS, HIGH);
digitalWrite(ADAFRUIT_CC3000_CS, LOW);
*/
SPI.begin();
//ARDUCAM
Serial.println("ArduCAM Start!");
// set the SPI_CS as an output:
pinMode(SPI_CS, OUTPUT);
//Check if the ArduCAM SPI bus is OK
myCAM.write_reg(ARDUCHIP_TEST1, 0x55);
temp = myCAM.read_reg(ARDUCHIP_TEST1);
if(temp != 0x55)
{
Serial.println("SPI interface Error!\n");
while(1);
}

myCAM.write_reg(ARDUCHIP_MODE, 0x00);

//Check if the camera module type is OV2640
myCAM.rdSensorReg8_8(OV2640_CHIPID_HIGH, &vid);
myCAM.rdSensorReg8_8(OV2640_CHIPID_LOW, &pid);
if((vid != 0x26) || (pid != 0x42))
Serial.println("Can't find OV2640 module!\n");
else
Serial.println("OV2640 detected\n");

//Change to BMP capture mode and initialize the OV2640 module
myCAM.set_format(JPEG);
myCAM.InitCAM();
myCAM.OV2640_set_JPEG_size(OV2640_1600x1200);
/*
//Initializing CC3000(Wifi Shield)
Serial.println(F("Initializating Wifi Shield!"));
if (!cc3000.begin())
{
Serial.println(F("Couldn't begin()! Check your wiring?"));
while(1);
}

//connect to SSID; if err, display failed
Serial.println(F("Connecting..."));
if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed to Connect!"));
while(1);
}
//else display connected
Serial.println(F("Connected!"));

//request for DHCP to find IP address
//will be deleted after configuring router
//Don't leave until IP address, DNS, and gateway is assigned
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP())
{
delay(100);
}
*/

}

void loop() {
char str[8];
File outFile;
byte buf[256];
unsigned long previous_time = 0;
static int i = 0;
static int n = 0;
static int k = 0;
uint8_t temp, temp_last;
int total_time = 0;
//myCAM.write_reg(ARDUCHIP_MODE, 0x01); //Switch to CAM
//temp = myCAM.read_reg(ARDUCHIP_TRIG);
if(digitalRead(pirPin)==HIGH)
{
//Flush the FIFO
myCAM.flush_fifo();
//Clear the capture done flag
myCAM.clear_fifo_flag();
//Start capture
myCAM.start_capture();
Serial.println("Start Capture");

while(!(myCAM.read_reg(ARDUCHIP_TRIG) & CAP_DONE_MASK));

Serial.println("Capture Done!");
//Construct a file name
k = k + 1;
itoa(k, str, 10); 
strcat(str,".jpg");        //Generate file name
//myCAM.write_reg(ARDUCHIP_MODE, 0x00);      //Switch to MCU, freeze the screen 
//GrabImage(str);

//Open the new file
outFile = SD.open(str, O_WRITE | O_CREAT | O_TRUNC);
if (! outFile)
{
  Serial.println("open file failed");
  return;
}
total_time = millis();
i = 0;
myCAM.CS_LOW();
myCAM.set_fifo_burst();
temp = SPI.transfer(0x00);
//
//Read JPEG data from FIFO
while ( (temp != 0xD9) | (temp_last != 0xFF))
{
  temp_last = temp;
  temp = SPI.transfer(0x00);

  //Write image data to buffer if not full
  if (i < 256)
    buf[i++] = temp;
  else
  {
    //Write 256 bytes image data to file
    myCAM.CS_HIGH();
    outFile.write(buf, 256);
    i = 0;
    buf[i++] = temp;
    myCAM.CS_LOW();
    myCAM.set_fifo_burst();
  }
}
//Write the remain bytes in the buffer
if (i > 0)
{
  myCAM.CS_HIGH();
  outFile.write(buf, i);
}
//Close the file
outFile.close();
total_time = millis() - total_time;
Serial.print("Total time used:");
Serial.print(total_time, DEC);
Serial.println(" millisecond");
//Clear the capture done flag
myCAM.clear_fifo_flag();
}

}

Shutter Speed

Hey there,

not quite an issue, but how can I manually adjust ISO, WB and Shutter Speed with OV2640 ArcuCam Mini?

Thanks!

Problem receiving image from ArduCAM Mini 5MP Rev.B

Hi everyone!

I'm new with this component. i0ve looking for information about some tutorials or how people connect it to start using it. I've found a lot, but it seems like everybody achieve to run it in their first attempt. I am using an Arduino Nano.

I have the next problem, maybe it has a stupid solution but i'm not able to see it.

I'm connecting the camera in the same way that the tutorial of the official website says (CS pin D10, MOSI pin D11, MISo pin D12, SCLK pin 13, GND and VCC of the camera to the GND and VCC of the Arduino Nano(5v pin), SDA pin A4, SCL pin A5).

I'm using the ArduCAM_host_v1.0.exe terminal to see if something is displayed but no images have displayed. I only can see how the terminal under says that the communication is opened but never says "ArduCAM Starts!", so I think that never achieve that part of the code. I only see garbage, and when I click "CAPTURE", I can only see a lot of ????????, but nothing displayed.

I'm using the example code of ArduCAM. I've not touched nothing of the code, because they says that it is not necessary if I only want to try to take an image and to see how it works

The baud rate of the ArduCAM host is the same of the code they supplies (921600). I've tried to change the baud rate but same result.

Someone could has any idea about what could be happening? If someone needs some more info about what i'm doing ask me and i will explain it better.

Thanks a lot!

Any help would be very good for me!

Cannot Compile "ArduCAM_Mini_OV2640_Video_Streaming"

I recently purchased an ArduCAM mini 2P OV2640 (Rev. B) and am using it on an Arduino UNO with v1.6.5 IDE. I downloaded the libraries from here and installed them and tested compiled the "ArduCAM_Mini_5MP_TimeElapse2SD.ino" example. It worked, but the images stored on the SD card were out of focus. I tried to use the video streaming example to help adjust the focus but it will not compile. I get this error:

ArduCAM_Mini_OV2640_Video_Streaming.ino: In function 'void loop()':
ArduCAM_Mini_OV2640_Video_Streaming:178: error: 'read_fifo_burst' was not declared in this scope
'read_fifo_burst' was not declared in this scope

I can compile all other examples including the video streaming example for the OV5642. Could you tell me how to get this to compile or which example would be best to use to help set up the camera using the host app?

Thanks,
Marcell

arducam mini pid

HI,

I just bought an Arducam and myCAM.rdSensorReg8_8(OV2640_CHIPID_LOW, &pid); seems to return 41 instead of 42 as in all the examples.

Any idea why that is?
Cheers

ArduCAM_Mini_OV2640_Yun_WebServer — IP Address Bug

There a bug affecting the IP address in the * ArduCAM_Mini_OV2640_Yun_WebServer* example.

By default, the last character is #0A, which makes the picture in the web page blank.

Just add if (ip[m] == 0x0A) ip[m] = 0x00; to line ca. 130

  while (q.available())
  {
    ip[m] = q.read();
    if (ip[m] == 0x0A) ip[m] = 0x00;
    m += 1;
  }

With this fix, the image is displayed correctly.

distorted image in latest http server demo

hello

When using ArduCAM_Mini_OV2640_websocket_server everything works fine

When i attempt to use ArduCAM_Mini_OV2640_Capture i get garbled frames in both video and static capture

sample
capture

could you help? i tried to look for code differences but byte buffers throw me off... init code seems the same

ArduCAM Mini 5MP rev B high res JPEG issue

Hi,

Great job on making a nice camera for an Arduino.

I have an issue when reading the pictures that have a larger resolution than 640 x 480. Namely the picture has an appropriate file size, however, when displayed half of the picture is missing.

I am using Arduino MEGA 2560 and this sketch to test the ArduCAM mini 5MP:
https://github.com/ArduCAM/Arduino/tree/master/ArduCAM/examples/mini/ArduCAM_Mini_OV5642_Video_Streaming

I am using the host application console for the test
https://github.com/ArduCAM/Arduino/blob/master/ArduCAM/examples/mini/ArduCAM_host_v1.0.exe

Here is the screenshot of the program. It can be clearly seen that lower part of the picture is missing

missing part of the pic

I get a similar result when I read the data over UART as well.
Is there an issue with the image interpretation or is there something else wrong

Thank you in advance
Dusan

Board not working with 4 OV5642. Only with 2 or 3.

Hello,

I have purchased the Arducam Mini shield and 4 OV5642 cams and I am currently trying to implement some of the provided examples but have come across some technical difficulties.

Specifically, although I can successfully upload the “ArduCAM_Mini_5MP_4Cams_TimeElapse2SD_LowPower” to the Arduino, the code runs consistently only in the cases when 2 camera modules are connected.

Plugging 3 cameras results in the desired behavior in some cases, while in others, the Arduino "freezes" (L led is ON) and is not recognized when connected to the PC.

Plugging 4 camera modules always leads to the aforementioned "freezing" behavior.

I have tried powering the Arduino from a 12V transformer without noticing any improvement.

Adjusting the shield's jumper between 3.3 and 5V doesn't seem to make any difference either.

It seems I've reached a dead end, so some insight that would help me put the whole thing together would be greatly appreciated.

SPI1 Interface Error with ESP8266

I'm using the ArduCAM library with a Sparkfun Thing. I believe the bit rotation fix for ESP8266 is causing a persistent "SPI Interface Error", at least for this model of ESP8266 board.

Here's some test code:

#include <Wire.h>
#include <ArduCAM.h>
#include <SPI.h>
#include "memorysaver.h"

const int CS = 16;

ArduCAM myCAM(OV5642, CS);

bool spiWorks() {
  int testValue = 0x55;
  myCAM.write_reg(ARDUCHIP_TEST1, testValue);
  uint8_t temp = myCAM.read_reg(ARDUCHIP_TEST1);
  if (temp == testValue){
    return true;
  }
  Serial.println("SPI1 interface Error!");
  Serial.print("Expected: ");
  Serial.println(testValue, 2);
  Serial.print("Got: ");
  Serial.println(temp, 2);
  return false;
}

void setup() {
  pinMode(CS, OUTPUT);
  Wire.begin(4, 5);

  Serial.begin(115200);
  Serial.println("ArduCAM Start!");

  SPI.begin();
  SPI.setFrequency(4000000); //4MHz

  if (spiWorks()) {
    Serial.println("Can do stuff?");
  } else {
    Serial.println("Cannot proceed");
  }
}

void loop() {
}

As you set different values for testValue in the spiWorks() function you can see that the result read back from the register (temp) is the same value that was sent it, but rotated right by 1 bit.

Expected:1010101
Got: 10101010

Expected: 1
Got: 10000000

That rotation is happening in ArduCAM.cpp to get around some ESP8266 issues. Maybe those issues don't exist for this board?

I tried rotating the value being set and that gets around this problem, but causes other problems down the road. In fact, this board works well without any bit rotation "fixes" at all.

I wonder if there's a better was to solve the ESP8266 bit rotation issue so there won't need to be specific fixes for specific boards.

Arducam mini Rev. B

Hii,
I have an arducam mini 2Mp Rev B and uno R3 board. I made pin connections from arduino 10>scl to arducam cs>scl pins (except vcc to 5V)
With Arducam_V1.exe application, I set the resolution 320x240 and baud rate 921600, and upload the ArduCAM_Mini_OV2640_Video_Streaming example in this repository.

But I couldn't take a valid image. When I capture a single shot, "OV2640 detected, Cam started single shot, Cam capture done", but take an error "A generic error occurred in GDI+". I saved the image and analyze the hex format of the image. Jpeg markers seems ok, but it is not a valid image. Captured file is in the attachment.

glass

Could u help me please?
Thanks,
myhn

Program is stuck at rdSensorReg8_8

Hi,

I'm using an Arducam Mini Module Camera Shield with OV2640 connected to an Uno. I'm using the code from ArduCAM_Mini_2MP_TimeElapse2SD.

The code runs through the init until it gets to:
myCAM.rdSensorReg8_8(OV2640_CHIPID_HIGH, &vid);

and never passes this line.

Any ideas what's wrong?

Thanks,

eladyt

ArduCAM Library not Compiling for Arduino DUE

Hi,

I am working with ArduCAM-Mini 2MP and Arduino DUE, and I am running the lastest version of Arduino, 1.6.7. I am trying to run some of the example code in the ArduCAM library, but I have not been able to get any of the downloaded library code to compile when Board is set to DUE. All of the code in the library will compile when Board is set to UNO, but as soon as I switch Board to DUE(Programming Port) I get a long list of error warnings. For example, compiling ARDUCAM_MINI_OV2640_Video_Streaming gives warnings such as the following (The complete list of warnings is attached as a text file):

In file included from C:\Users\myUserName\Documents\Arduino\libraries\ArduCAM\examples\mini\ArduCAM_Mini_OV2640_Video_Streaming\ArduCAM_Mini_OV2640_Video_Streaming.ino:23:0:

C:\Users\myUserName\Documents\Arduino\libraries\ArduCAM/ArduCAM.h:131:0: warning: "pgm_read_byte" redefined [enabled by default]

     #define pgm_read_byte(x)        (*((char *)x))
^ 

In file included from C:\Users\myUserName\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.6\cores\arduino/Arduino.h:31:0,

                 from sketch\ArduCAM_Mini_OV2640_Video_Streaming.ino.cpp:1:

C:\Users\myUserName\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.6\cores\arduino/avr/pgmspace.h:56:0: note: this is the location of the previous definition

 #define pgm_read_byte(addr) (*(const unsigned char *)(addr))

 ^

I was able to successfully run some basic code (blinking an LED light) with the DUE, so the way that I am connecting to the DUE does not seem to be the issue. I have been reading a lot on the forums, and I have not found anything that seems to fully address my problem. I have found some things that suggest this may be a problem due to PROGMEM only being compatible with AVR-based boards, while the DUE is ARM-based, but I am unsure how to proceed if that is the case.

Please let me know if you know anything regarding this error and if there are any modifications to the code that I should be making in order to run the library on DUE. I would appreciate any help in resolving this issue.

Thank you for your time!

For a complete error warning, please see:
ArduCAM_DUE_Errors.txt

Is there any example using the TFT display AND its touch screen for ARDUCAM Rev. C?

Hi all,

I am looking for any example (and/or library) to setup the touch screen for the ARDUCAM Rev. C. Currently, I am using Arduino DUE, but I should be able to modify any example developed for other boards.

It seems that the touch and the TFT display use the same SPI bus. I was able to run the UTFT_SPI test examples, but none of those Arducam_Touch examples.

Any help is appreciated. Thanks.

ArduCam Library not compiling

this is the error message i get its the same error on all the of the camera examples can you plz help

Arduino: 1.7.8 (Mac OS X), Board: "Arduino M0"

ArduCAM_Mini_2MP_TimeElapse2SD.ino:16:22: fatal error: UTFT_SPI.h: No such file or directory
compilation terminated.
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

ESP8266 Arduino Core

I've been trying to get an ArduCAM mini to work with a LoLin ESP8266 ESP-12 using the Arduino core and Arduino IDE.

It works perfectly on my UNO.

There was a compile issue with ArduCAM.h as it does not define a section for "ESP8266". Having fixed (bodged) that I think my inserted section has issues because the following line in ArduCAM.cpp causes the ESP to crash and restart.

207 //Must initialize the Bus default status
208 sbi(P_CS, B_CS);

I don't suppose you've experiment with this setup at all? I'm afraid my personal knowledge of Arduino code and boards is not very good at the moment and I'm not really sure where to start debugging it. I'm a c# developer and trying to learn.

Display of the images of an ArduCam Mini 5MP v5642

Hi everyone!

I have tried the example provided by ArduCam to make it works and it do it perfect using the ArduCam_host.exe. So I was able to check that the camera works.

My question is the next. I am doing a project where I want to send the image of the camera to a webpage. I don't want to use nothing like ESP8266 modules, I want to send it while my Arduino Nano is connected to my PC via USB, using (in my case) COM3 port.

ArduCam_host.exe leave me to choose which port I've connected my Arduino, so selecting COM3 port, I can see what my camera is displaying.

There is some way to send the image of my Arducam to a webpage in the same way it does to the Arducam_host.exe application?

The main purpose of this is to be able to detect red objects with the camera throught the webpage, and send to my Arduino Nano a command like "if red detected, then turn on the motors" for example.

I have read that Arduino is not able to process images because is out of its posibilities, so I want to do the processing in the webpage.

Maybe someone knows how to send the image to a webpage instead of the Arducam_host.exe based on the ArduCam_Mini_OV5642_Video_Streaming example of Arduino IDE?

I hope to explain well my issue!

Thanks a lot! Any help will be so grateful!

Take a snapshot and analyze rgb data

Hello,

I would like to collect RGB data from a snapshot. But I don't get on how to access this data, without storing the image or whatever.

Any idea? Example on where to start?

Best regards,

Xavier

start_capture have no valid scope.

"start_capture" function is defined at two places.

  1. ArduCAM_Mini_OV2640_websocket_server.ino Line : 176 . Local function within the file
  2. With the ArduCAM class definition as a Public function.

In ArduCAM_Mini_OV2640_websocket_server.ino line: 61 , start _capture have an ambiguity of scope.
Two possible methods to get the build through are

  1. start_capture can be called with ArduCAM object ( myCAM.start_capture();)
  2. The local function shall have a proper prototype (void start_capture(void);)

Error:
C:\Temp\ArduCAM_Mini_OV2640_websocket_server\ArduCAM_Mini_OV2640_websocket_server.ino: In function 'void handleClientData(String&)':

ArduCAM_Mini_OV2640_websocket_server:61: error: 'start_capture' was not declared in this scope

 start_capture();

SPI configuration for ArduCAM mini

Whatever the example I try with the ArduCAM mini, same error message SPI interface ERROR!

What are the exact settings for SPI and especially, which mode?

Thank you!

ArduCam Mini Rev B + Arduino Wifi101

Afternoon,

I have successfully interfaced an Arduino Mega 2560, an AdaFruit SD Card breakout, and the Arducam Mini 2MP Rev B. I am able to get images from the card without issue. I have run into an issue however; adding the Arduino Wifi101 Shield prevents the Arducam from being detected (the SD breakout appears to work fine).

Nothing with regards to wiring has changed (except that now the WiFi shield is attached to the Mega - all wires still go into the same pin locations as previously).

Is there another step that needs to be taken when also interfacing with the WiFi101 shield, or is there something else going on?

5MP OV5642

Hi, I have bought the 5MP OV5642 Sensor Arducam Mini Camera Shield JPEG output for Arduino Mega2560 - hoping that I can actually use it with arduino.

After spending countless amount of time looking for a code to use it, way to connect I kind of gave up....
Why is it so hard to provide a simple instructions to follow? Even to find how it should actually be connected to arduino uno - probably most popular is quite a task.....
I downloaded all sample codes I could find to just be able to see the picture from the camera - none of them will actually verify in arduino ide....
Can I please ask for a link to file which works? I had countless amount of errors, last one I tried is:
ArduCAM_Mini_OV5642_Video_Streaming.ino
which comes with following errors:

/Users/xeon/Desktop/ArduCAM_Mini_OV5642_Video_Streaming/ArduCAM_Mini_OV5642_Video_Streaming.ino: In function 'void setup()':
ArduCAM_Mini_OV5642_Video_Streaming:76: error: 'OV5642_CHIPID_HIGH' was not declared in this scope
myCAM.rdSensorReg16_8(OV5642_CHIPID_HIGH, &vid);
^
ArduCAM_Mini_OV5642_Video_Streaming:77: error: 'OV5642_CHIPID_LOW' was not declared in this scope
myCAM.rdSensorReg16_8(OV5642_CHIPID_LOW, &pid);
^
exit status 1
'OV5642_CHIPID_HIGH' was not declared in this scope

many thanks for any advice - I really would like nothing more than to see the picture from the camera....

ArduCAM Mini 2MP picture out of focus

Hi, I have an ArduCAM Mini 2MP and I first set it up on an Arduino Uno, and using the ArduCAM_v1.0 host application I could take Single Shoot and Continuous Shoot no problem, and the picture was in focus and good.
I tried to setup using the "ESP8266 ESP-12E WIFI Wireless Dev Board for Arduino IDE UNO WeMos D1" board as I want the WiFi and websocket functions. Got this working as well but the pictured is blurred and out of focus.
I change the Mini 2MP back to the Uno board and this is now also out of focus.
Have tried different patch cables between the board and camera in case of a broken wire but still out of focus.
Any ideas what has happened? Is seems to be an issue with the camera?
ac mini focus

Help need conect arducam ov2640 with module Sd card

Hellow. my problem is. I have an arducam ov2640, i wanna save the photos in a module SD card but when i conect ov2640 and module sd in a arduino mega, arducam doesnt works but whe disconect module Sd arducam works. maybe 1 pin in the code affect the other pls help me thx

Blurry image when used in motion, Exposure time adjustment?

Hello,
recently I've purchased few ArduCAM mini modules OV2640 and OV5642...
The goal is for evaluating the camera module build quality and possibility to be used in a mass production devices with both 2MP and 5MP variants.
So far I am amazed with the products overall quality, PCB board, soldering, lenses, product packaging software support and documentation - everything is better than all other competitive products.
However, during the tests I've figured out, that camera performs perfect when stationary, and produces
a blurry image, even when moved slowly during footage. This effect is observed both with 2MP i 5MP devices, and with various resolutions. Is there any way for setting exposure time by software?
In the provided libraries all registers are configured via table based values, for each model and resolution.
How can we find detailed description of these values, and which are responsible for fine tune
of colour tint, white balance, scan modes and resolutions, and exposure times as well.
Thank you
Best Regards

ArduCam Mini not working

There seems to be less documentation for the mini board than the others; I can't get it to work (OV 5642). I get just garbage back to the serial monitor. Also, since there's no SD port on the mini shield, how will I save pictures?

Any help is appreciated!

Thanks,
jg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.