Using ATWINC1500 WiFi Breakout and TTL Serial Camera

Hey all,

I’m trying to use both my Adafruit TTL Serial JPEG Camera with NTSC Video and Adafruit ATWINC1500 WiFi Breakout in the same circuit with my official Arduino MEGA 256. I have my camera connected to TX RX (18, 19) and my wifi breakout connected properly. I can use my camera to take a picture successfully and I can use the wifi module to run the examples in Wifi101 successfully (independently). But, then when I go to run the code below (testing both in same circuit), the wifi module never responds but the camera succeeds setupCamera(). In fact, I get sporadic behavior after I run this code because after I upload it, sometimes the wifi module fails to do even the Example sketches of Wifi101 after. Any idea whats causing this conflict?

#include <Adafruit_VC0706.h>
#include <SPI.h>
#include <WiFi101.h>

#define WLAN_SSID "TEST"        // cannot be longer than 32 characters!

Adafruit_VC0706 cam = Adafruit_VC0706(&Serial1);
WiFiClient client;
int status = WL_IDLE_STATUS;

void setup() {
  // put your setup code here, to run once:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only

void setupCamera() {
  if (cam.begin()) {
    Serial.println("Camera found:");
  } else {
    Serial.println("Camera not found !");
  if (!cam.takePicture()) {
    Serial.println("Failed to snap!");
  } else {
    Serial.println("Picture taken!");

void setupWifi() {
  WiFi.setPins(8, 7, 4);
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while (true);

  // attempt to connect to Wifi network:
  while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(WLAN_SSID);

    // wait 10 seconds for connection:
  Serial.println("Connected to wifi");

  // Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:

void printWifiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");

  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.println(" dBm");

void loop() {
  // put your main code here, to run repeatedly:

I am basically trying to follow this guide:

with the parts listed above.

I can post pictures if requested. I really need help with this for a school project!!!

with my official Arduino MEGA 256.

Does that have 1/10th the memory of a 2560?

Why does taking a picture happen in setupCamera()?

You need to post links to the hardware (camera and wifi shield) along with links to the libraries you are using. I can't begin to guess what pins 8, 7, and 4 are supposed to be used for.

and my wifi breakout connected properly.

Says who?