Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers.

Python GUI in OSX

0 votes

I am trying to follow the tutorial  "Tuning the color-based object tracker using a python graphical interface" to use it in mmac OSX. I'm in Python 3.6. I tried to run the objectrackertunig.py file from the Python IDLE but I can not get the interface out.
On the other hand I want to use the Adafruit Feather 32u4 Bluefruit LE card with my Jevois; you have used both together, what is the skecht you have used?
Finally I wanted to comment that I have achieved good results for the different video stream from the Open Broadcaster Software application; different resolutions and framerates can be accessed.
Thank you very much.
Best regards.

asked Jul 31 in User questions by jandraka (120 points)

1 Answer

0 votes

(sorry for the delay as we are just back from vacation)

For the python GUI, you need to install two python packages, and one of them (python-tk) may not work well on macs? Can you take the code we had for the color tracker tuning and reduce it to

from Tkinter import *

master = Tk()

w1 = Label(master, text = "Hue min")



and see whether that works? Or maibe try to run some of the TkInker tutorials to see where the problem might be?

For the bluefruit LE, we have used this simple code to relay data between JeVois serial and BLE (like the demo code for the bluefruit except for the loop() code):

// Sample UART relay using AdaFruit Feather 32u4 LE

#include <Arduino.h>
#include <SPI.h>
#if not defined (_VARIANT_ARDUINO_DUE_X_) && not defined (_VARIANT_ARDUINO_ZERO_)
  #include <SoftwareSerial.h>

#include "Adafruit_BLE.h"
#include "Adafruit_BluefruitLE_SPI.h"
#include "Adafruit_BluefruitLE_UART.h"

#define BUFSIZE                        128   // Size of the read buffer for incoming data
#define VERBOSE_MODE                   true  // If set to 'true' enables debug output
#define BLUEFRUIT_HWSERIAL_NAME      Serial1
#define BLUEFRUIT_UART_MODE_PIN        12    // Set to -1 if unused
#define BLUEFRUIT_SPI_CS               8
#define BLUEFRUIT_SPI_IRQ              7
#define BLUEFRUIT_SPI_RST              4    // Optional but recommended, set to -1 if unused
#define FACTORYRESET_ENABLE         1
#define MODE_LED_BEHAVIOUR          "MODE"

// Create the bluefruit object

// A small helper
void error(const __FlashStringHelper*err) {
  while (1);

void setup(void)

  /* Initialise the module */
  if ( !ble.begin(VERBOSE_MODE) )
     error(F("Couldn't find Bluefruit, make sure it's in CoMmanD mode & check wiring?"));
    /* Perform a factory reset to make sure everything is in a known state */
    if ( ! ble.factoryReset() ) error(F("Couldn't factory reset"));

  /* Disable command echo from Bluefruit */

  ble.verbose(false);  // debug info is a little annoying after this point!

  /* Wait for connection */
  while (! ble.isConnected()) {


  // LED Activity command is only supported from 0.6.6
  if ( ble.isVersionAtLeast(MINIMUM_FIRMWARE_VERSION) )
    // Change Mode LED Activity
    ble.sendCommandCheckOK("AT+HWModeLED=" MODE_LED_BEHAVIOUR);

  // Set module to DATA mode


void loop(void)
  while (ble.available()) Serial1.write(ble.read());
  while (Serial1.available()) ble.write(Serial1.read());

Remember to set your JeVois serial port to 9600 by editing JEVOIS:/config/params.cfg on your microSD card (uncomment the settings related to BLE). Then you should be able to communicate with JeVois from an iPad or similar using the bluefruit app.

thanks for the pointer to Open Broadcaster, downloading it now to try it out!

answered Aug 18 by JeVois (11,490 points)