Although it may be possible to modify Oleg Mazurov’s code and example, I agree it may be a lot of work.
There’s many examples using the Raspberry Pi and USB to talk to the THETA. So, although there are problems with the Raspberry Pi, including clean shutdown, you can probably get something up quickly.
There’s a set of tutorials here:
Possible Serial Port Capability in the Future
On this thread, you can see that for hobbyist experiments, we can access the camera through the serial port. Note that this is not a good solution for production projects right now because it requires manual “permission setting” with something like Vysor. If you’re working on a potentially high-volume project, I can pass your requirements on to RICOH, which might help nudge them. Feel free to send me a DM, if this is a potentially high-volume camera sales project.
Bluetooth
This type of device connects to the THETA with Bluetooth. It’s theoretically possible to build something for Arduino, but there is no working example.
Using Sony MESH IoT Plug-in with RICOH THETA V
Current Status Assessment
- Appears that there is no easy-example PTP code for Arduino
- I can’t find any Bluetooth example code to work with the THETA Bluetooth API
- WiFi will work from Arduino and is easy, but I think you want the stability of a USB connection
- Raspberry examples work and you can power the THETA from the same USB cable that sends commands. The RPi can power the THETA for taking pictures indefinitely.
- You can send WiFi API commands over the serial cable from the Arduino to a plug-in, but this is only for “technical prototypes”
Current Recommendation
In order to get something working, I would try the Raspberry Pi and the RICOH THETA USB API. Once you have it working, you can either fine-tune it on the RPi or try another platform.
If you want to play around with the serial port, there are many examples of taking a picture from the serial port. Here’s a snippet. There are full code examples. Be aware that this strategy will not work unless the “serial port” of the camera is enabled with Vysor.
int ThetaAPI_Post_takePicture(void)
{
int iRet=0;
iTakePicStat = TAKE_PIC_STAT_BUSY;
String strSendData = String("{\"name\": \"camera.takePicture\" }");
String strJson = ExecWebAPI("POST", "/osc/commands/execute", strSendData, HTTP_TIMEOUT_NORMAL);
iRet = strJson.length();
if ( iRet != 0 ) {
char sJson[iRet+1];
strJson.toCharArray(sJson,iRet+1);
StaticJsonBuffer<200> jsonBuffer;
JsonObject& root = jsonBuffer.parseObject(sJson);
if (!root.success()) {
//Serial.println("ThetaAPI_Post_takePicture() : parseObject() failed.");
iRet=-1;
} else {
const char* sState = root["state"];
String strState = String(sState);
//Serial.print("ThetaAPI_Post_takePicture() : state[" + strState + "], " );
if ( strState.equals("error") ) {
const char* sErrorCode = root["error"]["code"];
const char* sErrorMessage = root["error"]["message"];
//Serial.println("Code[" + String(sErrorCode) + "], Message[" + String(sErrorMessage) + "]");
iTakePicStat = TAKE_PIC_STAT_DONE;
iRet=-1;
} else { //inProgress
const char* sId = root["id"];
strTakePicLastId = String(sId);
//Serial.println("id[" + strTakePicLastId + "]");
iRet=1;
}
}
}
return iRet;
}