Thursday, December 28, 2023

Is There Anybody Out There?

This time of year, post-Christmas, I'd usually be going back and forth between the surplus supplier websites, loading carts, buying lots of stuff.  The last years have seen some losses. 

AEC closed this summer, the owners retired (50 years was enough, I guess), but there's an employee spin-off that's trying to get up to speed.  

BGMicro closed a couple of years ago.

Goldmine is still around.  And Marlin P. Jones is still around (with reduced inventory - where have all the open-frame linears gone?).

Jameco is still operating, but they aren't surplus. DigiKey and Mouser are still, strong of course, because they primarily serve industry, but they don't discourage individuals.

Dan of Dan's had retired, but after moving decided to continue from his new location. He has a small inventory - RF transistors and some interesting components.

I used to live in Santa Clara County. They had a few great surplus stores, peaking in the late 90s: the venerable Halted (HSC) and a spin-off called Haltek, Weird Stuff Warehouse, Alltronics and Anchor Electronics. I guess I should not fail to mention Fry's (not the grocery).  I think Anchor is still in business, but the merchandise was all new, basically. Weird Stuff didn't last long. Alltronics went all on-line and then a change in ownership. I think they're on their way out. Halted has gone out of business recently, too. All that shook out after I moved away from there.

What's going on? My speculation: fewer small businesses with inventory to dump, less excess inventory because of JIT, lack of hobbyist interest despite all the Arduino (they won't solder and the thought of transistors and resistors are figured a conspiracy) and -- amazon.

Sunday, June 18, 2023

HC-05 - Configuring for AT

 If you have an HC05 Bluetooth transceiver and you would like to change its name or password, or go from Mode0 ('slave') to Mode1 ('master'), then you will have to get it into AT mode.

Here are two wiring configurations. Which to use depends on whether you have a device with a pushbutton (ckt on the right) or not (ckt on the left).



Upload the following sketch. 
[ It's Martyn Currey's, basically, but he used a single letter variable ('c', which I changed to 'ch') and I like 19200 bps for Serial. ]

 #include <SoftwareSerial.h>
SoftwareSerial BTserial(8, 9); // RX | TX
const long baudRate = 38400; 
char ch =' ';
boolean NL = true;
void setup() 
{
    Serial.begin(19200);
    Serial.print("Sketch:   ");   Serial.println(__FILE__);
    Serial.print("Uploaded: ");   Serial.println(__DATE__);
    Serial.println(" ");
    BTserial.begin(baudRate);  
    Serial.print("BTserial started at "); Serial.println(baudRate);
    Serial.println(" ");
}
void loop()
{
   // Read from the Bluetooth module and send to the Arduino Serial Monitor
   if (BTserial.available())
  {
     ch = BTserial.read();
     Serial.write(ch);
  }
  // Read from the Serial Monitor and send to the Bluetooth module
  if (Serial.available())
  {
     ch = Serial.read();
     BTserial.write(ch);   
     // Echo the user input to the main window. The ">" character indicates the user entered text.
     if (NL) 
    { 
       Serial.print(">");  
       NL = false; 
    }
    Serial.write(ch);
    if (ch == 10) 
    { 
       NL = true; 
    }
  }
}

The connection to +5V should be open at first. Assuming SerMon is ready, connect 5V. You are now in AT mode. (You may like to click Reset after Uploading.)

Type AT in the text to send window, then press ENTER. The HC05 should respond with 'OK'.

To check the version, type AT+VERSION?,  then press ENTER. The HC05 should respond with '+VERSION (the number)'

To change the Name, type AT+NAME=the_name_you_like,  then press ENTER. Confirm that by Sending AT+NAME?

Find all the commands and other gorey details --

HC0305 AT manual

I'm not absolutely certain that these configs get absolute full access to the complete AT everything. I found RNAME was ignored in one instance (not thoroughly investigated). It may be that Pin34 has something more (or RNAME didn't have a purpose in re. the version I tried that on).