Who is here? 1 guest(s)
 Print Thread
SOLVED: Artisan says: "Arduino could not set channels"
mtwenzel
... which is an exception raised in ARDUINOTC4Temperature().

I have set things up according to the excellent video tutorial posted by greencardigan in another post, and I'm puzzled about the source of the error.

It much looks like a Bluetooth problem. Through USB, the sensors work, also the control of heater and fan. Through Bluetooth, however, the above error occurs. Looking into the Artisan code, it seems to me as if the physical connection must have been successfully established (the exception only occurs in a block conditional on self.SP.isOpen() ), but the response to the channel isn't right.

Then, I tried if I can connect to the serial port from the Arduino IDE, but it does not work. Lastly, I tried if I can upload the sketch anew (onto a spare Arduino I plugged in for this purpose), and again, the transfer starts, but then it throws a bunch of errors indicating a lacking synchronisation with the Arduino.

Can this be a wrongly configured Bluetooth module? It came preconfigured with my order of the TC4+ shield including an Arduino board pre-loaded with the aArtisan sketch.

I'd love to hear opinions, advice, and perhaps solutions to this thing!
Cheers, Markus
Edited by mtwenzel on 01/30/2021 4:17 AM
 
mg512
If it's working via USB, then the Arduino sketch should be OK.

The first thing to check is if the jumpers on the TC4+ are set correctly. Near the top left corner of the board (near the BT module header) there is a 2x3 set of pins with two jumpers on them, and labeled BT_SEL. The two jumpers should be horizontal and on the left two pins of each row, like in the picture attached. If they aren't, put them there, and see if it works?

It is also possible that the bluetooth module is misconfigured, though unlikely. Are you able to pair with it at all, and does it accept the PIN you got in your shipping confirmation?
mg512 attached the following image:
tc4pbtsel.jpg
 
renatoa
Another reason could be that your BT adapter is BLE, not old style serial BT.
They work completely different...
HC06, MLT-BT05, CC41-A, HM-10, for example, are BLE.
 
mtwenzel
Firstly thanks for the very speedy replies!

So, let me try to get this in order.
* The BT module has only one text item on it that reveals its origin: www.hc01.com This is all Chinese, and more trouble to translate than I'm willing to invest. So I can't tell from the chip alone if it is BLE or old-style.
* I ordered the TC4+, the Arduino, and the BT module in "preconfigured" version through Tindie, so I was expecting that jumpers etc. are set correctly. Mine are set differently from the mg512 image: they are vertical and to the right of the 3x2 pins. See image...
* Also, the BT module has six pins, but the TC4+ header only five slots. See attached image for how I attached it. I tried to replicate this from the pictures in the Instructables post (https://www.instructables.com/Arduino-controlled-DIY-Coffee-Roaster/).

Both Windows and Mac physically connect to the module and ask for the Pin Code. The module shows up as "connected" thereafter, and as written, even Artisan apparently can open the serial port, only can't issue the commands.

I'd next try and set the pin headers differently, if you think this might be it. Actually, after reading the TC4 BT guide (https://coffee.gerstgrasser.net/assets/TC4plus_Bluetooth_configuration.pdf) it appears to me that they accidentally have been left in the IO4 IO5 mode from programming the module. Is this possibly an explanation?
mtwenzel attached the following images:
20210123_121311.jpg 20210123_121122.jpg 20210119_222507.jpg

Edited by mtwenzel on 01/23/2021 5:58 AM
 
renatoa
Unfortunately, it's a HM-10 BLE. Check below if ID'ed it correctly, the 8th in the "suspects lineup" Grin picture

http://www.martyn...h-modules/

You have two choices:
- replace with a BT 2.0 old style, now you know what to buy, from the article above, or
- buy a BLE USB dongle for your laptop
Edited by renatoa on 01/23/2021 5:59 AM
 
mtwenzel
Interesting. The details close to the pins are markedly different, but nevertheless the resemblance is striking.

I followed my suspicion that the jumpers might have been left in programming mode and moved them to the 'serial position' as directly suggested in the first reply. And it works (on MacOSX, anyways).

So I guess I can close this thread with a big thank you!
 
renatoa
Mac mini and MacBook Air were both updated with Bluetooth 4.0, i.e. BLE, so you are lucky, no more dongle needed smile
 
mg512

Quote

renatoa wrote:

Unfortunately, it's a HM-10 BLE. Check below if ID'ed it correctly, the 8th in the "suspects lineup" Grin picture



It's a HC-05. Scroll down to the actual HC-05 and HM-10 subsections and the photos there and you'll see.

And, important for anyone reading this: Even if your laptop supported BLE (Bluetooth Low Energy, aka Bluetooth 4.0), you cannot use a BLE module instead of the HC-05 / HC-06. BLE/BT4.0 works differently from regular Bluetooth, and doesn't work as a serial port which you need here. Do not buy BLE modules for this.


Quote

mtwenzel wrote:

Interesting. The details close to the pins are markedly different, but nevertheless the resemblance is striking.

I followed my suspicion that the jumpers might have been left in programming mode and moved them to the 'serial position' as directly suggested in the first reply. And it works (on MacOSX, anyways).

So I guess I can close this thread with a big thank you!


Happy to hear it's solved!
 
renatoa
Boomer... checked the lineup picture only and wrong assumed they are in the same order as list below...
 
Jump to Forum: