My mate @kline tells me that the STM32 is “more common” than the SAMD line.
Category Archives: Hardware
Controlling Arduino Uno with Serial commands
@kline helped me with Phase 1 of my Crustacean Chirpy Chip Challenge project, which I have completed (sort of). I got the programming done but I didn’t do all the reading (yet).
Note to self: My Arduino Uno knockoff identifies itself as a “QinHeng Electronics USB Serial” USB device.
This is my code:
enum state { OFF, ON, FLASH };
enum state state = OFF;
int blink_pin = 13;
void setup() {
pinMode( blink_pin, OUTPUT );
Serial.begin( 9600 );
}
void loop() {
if ( Serial.available() > 0 ) { read_command(); }
switch ( state ) {
case ON :
digitalWrite( blink_pin, HIGH );
break;
case OFF :
digitalWrite( blink_pin, LOW );
break;
case FLASH :
int pin = digitalRead( blink_pin );
digitalWrite( blink_pin, !pin );
delay( 500 );
digitalWrite( blink_pin, pin );
delay( 500 );
break;
}
}
void read_command() {
String command = Serial.readString();
command.trim();
command.toLowerCase();
Serial.print( "Command: " );
Serial.println( command );
if ( command == "on" ) {
state = ON;
}
else if ( command == "off" ) {
state = OFF;
}
else if ( command == "flash" ) {
state = FLASH;
}
else {
Serial.println( "Unknown command." );
}
}
The code which would actually implement the spec, as given:
void read_command() {
char c = Serial.read();
switch ( c ) {
case 'a' :
state = ON;
break;
case 's' :
state = OFF;
break;
}
}
Embedded Systems with ARM Cortex-M Microcontrollers in Assembly Language and C
Today I learned about Embedded Systems with ARM Cortex-M Microcontrollers in Assembly Language and C (Fourth Edition) by Yifeng Zhu while watching Lecture 9: Interrupts on YouTube. The full list of associated lectures are here: Short Lectures.
PicoRC: PicoPSU on Retro Computers!
Today on 0084 A battery powered 486DX2/66 setup and a 386 motherboard with a fancy BIOS I learned about PicoRC: PicoPSU on Retro Computers and also ATX4VC: ATX Power on Retro Computers.
Props to Corsair
Just wanted to say thank you publicly to Corsair. The case for my computer ‘charisma‘ is a Corsair Carbide 100R Silent Edition Mid-Tower ATX Case. I really love this case and in fact I have two of them.
Anyway I had a problem where one of the feet snapped off and I couldn’t find spares for sale anywhere on the internet. I applied for a replacement of the feet through the Corsair warranty process, which was comprehensive but relatively painless, and I am pleased to report that my new replacement feet arrived today.
I am a happy customer!
Undocumented LTspice
Today I discovered Undocumented LTspice while reading Introduction to LTspice – MIT (PDF).
SparkFun ATTiny85 Quick Reference
Today I happened upon this ATTiny85 Quick Reference.
Dear Diary
ChipQuik Alloy
On an EEVblog video I learned about ChipQuik Alloy which has a low melting point for removing difficult SMT components with a soldering iron.
JBC Soldering
Today I stumbled upon: https://www.jbctools.com/. They have some nice looking kit! JBC was mentioned by Dave Jones in EEVblog #596 – World’s Cheapest Soldering Station – Yihua 936 so I went looking.
