Engineering and technology notes

Moving Evernote notes into WordPress | Devolve

I’ve accumulated many notes (2000+) in Evernote over the years, and love that it can store binary attachments such as images or other media files. My favorite feature is the Evernote Web Clipper browser extension; it does a fantastic job at saving the parts of an article I want to save while keeping the styling intact.

Evernote has a free plan which I’ve enjoyed for a long time, but recently the financial status of the company has come into question, and they restricted syncing to only two devices. Also, the last thing I want to happen is another kind of Google Reader shutdown fiasco. I doubt that a shutdown would make my existing notes disappear, but it’s better to be prepared ahead of time. To that extent, I’ve been looking for a viable option to migrate my notes into another platform.

Obviously it’s not in Evernote’s best interest to help people migrate away from them, but nevertheless the desktop app provides two flavors of export: one big Evernote XML file with base64 encoded attachments; or a directory of HTML files, one for each note which a correspondingly-named .resources directory holding attachments and web assets for each note.

The technologically savvy searcher can find several projects designed to ETL data from Evernote’s servers and put in into another system. If you wanted to populate a Hugo site with Evernote data, one could use enwrite. If you’re already on WordPress you could try out the Evernote Sync plugin. But with as many notes as I have, pulling the notes from the central server is slow, error-prone, and likely to hit some usage limit that Evernote enforces. The best approach for me is to use the desktop app’s export feature and then transform it into something digestible by WordPress.

my solution

Following this track, I first thought of writing a converter for the giant Enex (Evernote XML) file to make it into one or more RSS / WXR files, then using the associated native importer for WordPress. But I wasn’t sure how to keep all the base64 attachments, or if I would be able to keep the metadata I wanted. After many fits and starts, I saw the WordPress plugin HTML Import 2. This is the solution that worked for me, but there’s no free lunch, and it took me at least five tries with it to get what I wanted. In fact it says plainly in the documentation that you won’t get it right the first time. 🙂

Making it work consists of going through about 5 panes of plugin settings, transforming the Evernote HTML files a bit, and putting all the files in the right place.

Source: Moving Evernote notes into WordPress | Devolve

20 Free Chrome Extensions for WordPress You Need Now – WPMU DEV

WordPress is an amazingly powerful CMS on its own, but if you could make it even faster and better right in your Chrome browser, wouldn’t you go for it? I would and that’s why I’ve compiled this list of the best Chrome extensions to pair with WordPress in this Weekend WordPress Project. What’s covered? I’ve sorted the lightweight and free extensions below to help you with: blogging and writing, styling and design, productivity and organization, site performance, and development. With these tools, you can get help improving your workflow and efficiency, making quick work of your tasks in WordPress.

Source: 20 Free Chrome Extensions for WordPress You Need Now – WPMU DEV

Ebay cheap TDA7498 boards – diyAudio

I’m building a hi-fi for my wife for christmas and just bought one of these TDA7498 boards to do the heavy lifting of driving the speakers:

TDA7498 100W 100W Class D High Power Amplifier Board DC20V to DC36V | eBay

There seem to be tons like them on eBay.

Anyone had any experience with them? Any modifications that have to be made to make them sound good? They look fairly decent, with WIMA type caps on the output filter and a decent heatsink…

Source: Ebay cheap TDA7498 boards – diyAudio

ide – How do I debug on-chip with Arduino? – Arduino Stack Exchange

Though an emulator is quite useful for debugging code that has no side effects, most real-world applications include some circuitry besides the Arduino. If a microcontroller on an Arduino had a JTAG interface, it would be pretty straight-forward, but what if it’s e.g. an Arduino Uno?

Source: ide – How do I debug on-chip with Arduino? – Arduino Stack Exchange

How to configure the Atmel AVRISP MKii to work with Arduino IDE

Hello all, since I’ve been helped by so many knowledgeable and generous people here, I wanted to give back a little on what I’ve learned.  After two days of searching literally hundreds of forums, blogs and spec sheets, I was finally able to get my Atmel AVRISP MKii to work with the Arduino IDE and upload sketches to my breadboarded Mega 328P IC.  I found many threads with tips on doing this and that, but none had all the missing pieces nor helped walk a newcomer through all the little adjustments that had to be made in order to make this happen (at least for a newbie like myself).

So here goes;  For this particular tutorial, I’m using a breadboarded Mega328P with the Atmel AVRISP MKii with Arduino IDE 0023 on a Windows 7 machine. If anyone spots an error, please let me know.

1.  DO NOT install the Atmel AVR Studio software suite.  It installs the “Jungo USB” driver which is not compatible with AVRdude (which the Arduino IDE uses).  You can either use one of the other, not both at the same time.

If by chance you had already installed AVR Studio and the Jungo Drivers, don’t worry, I’ll show you how to replace it further down.

2.  Download the LibUSB-Win32 driver and extract it somewhere temporary.  It can be found at www.libusb.org, however, for some reason my machine did not like this version, so I found another version that appeared to be tailored specifically for the AVRISP MKii here: http://mightyohm.com/blog/2010/09/avrisp-mkii-libusb-drivers-for-windows-7-vista-x64/

3.  Now if you haven’t installed the Jungo USB drivers, then you can simply plug in your AVRISP MKii, but when it asks whether you wish to install the drivers for it automatically or manually, choose MANUAL. If your did like mine and went ahead automatically and installed the stinkin Jungo USB drivers anyway, then you’ll need to do the follow:

How to replace the Jungo USB drivers:
A. Go into your Device Manager and expand the tree under “Jungo”.  If you see “AVRISP mkII” there, then you’ll need to replace that driver with the LibUSB-Win32 driver. Right-Click and select “Update Driver Software” and then choose “Browse my computer for driver software”.  Then simply navigate to where you extracted your LibUSB-Win32 drivers and let it do it’s thing. If it refuses to replace it or says that Windows deems the current driver the latest, then you’ll need to find a better/newer copy of the LibUSB driver.  You can also try uninstalling the Jungo driver first, but my smartass PC kept reinstalling it automatically everytime I plugged the AVRISP MKii back in—regardless of me manually clicking cancel!

4. If the LibUSB-Win32 driver installed correctly, the AVRISP MKii should now appear under “LibUSB-Win32 Devices” instead of the Jungo tree. This is important to make sure of because the Arduino IDE will NOT work with it as long as it appears under Jungo.

5. Now, to get the Mega328p to work with IDE 0023, you’ll need to edit the /hardware/boards.txt << within your Arduino install folder and add the following to the very bottom:

###############################################

atmega328bb.name=AVRISP mkII w/ ATmega328
atmega328bb.upload.using=arduino:avrispmkii
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600
atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=standard

###############################################

Keep in mind the above is for the Mega328P (the “P” being the “Pico” version of the chip). You’ll need to make some minor adjustments for the non-pico version).

6. Now locate /lib/preferences.txt file and find the line “upload.using=bootloader” and replace it with, “upload.using=avrispmkii” (we’re just replacing the bootloader with the avrispmkii)

7. DONE! You’re now ready to begin using your new AVRISP MKii!!! When you first open up the Arduino IDE (I’m using 0023) go to Tools > Boards > and you’ll see a new entry for “AVRSIP MKII w/ ATMega328” > choose this one if you’re that’s the chip you’re using like I am.  After that, I’d suggest you try out a simple sketch like the Blink LED in the examples folder and make sure it all works.

Some closing tips. If you’re hooking up the MKii to your breadboard, be sure you have the cable’s pinouts correctly.  I found so much confusing and contradictory pinout information for the AVRISP MKii on the web it was rediculous. It all comes down to locating PIN 1 — which is always located on the side of the ribbon with the stripe. Now since two pinholes line up with the ribbon stripe, look carefully for a triangle symbol. The triangle will point you to PIN 1, and thereafter you can make out the orientation of all the other pins.

I really hope this helps out other people and saves you all the headaches I had to go through to get this thing working. I swear at one point I was ready to hang the MKii on a post outside and put a bullet through it!

Source: How to configure the Atmel AVRISP MKii to work with Arduino IDE

JTAG Debugging

I am very excited to finally see the Due in the wild. I am eagerly looking for its soulmate, the JTAG debugger. What are our options for debugging 96kb of code? Can we use low-cost debuggers like the LPC-LINKs or are Atmel’s programmers like the JTAGICE II our only choice?

Source: JTAG Debugging

AWS Secure Provisioning

The Zero Touch for AWS IoT Secure Provisioning Platform for AWS IoT offers the industry’s first end-to-end security solution for Internet of Things (IoT) devices that connect to the Amazon Web Services’ (AWS) cloud. The product was developed jointly with AWS and will help IoT devices complying quickly and easily with AWS’s mutual authentication IoT security model. Then new security model states that a device must use mutual authentication with a remote server to be authorized on the AWS cloud. Adding Microchip’s pre-configured ECC508 device and software kit to a system is now the simplest and most secure solution available to connect to the AWS IoT service.

In the Internet of Things (IoT) space, security is by far the greatest challenge that designers need to overcome. Microchip’s Zero Touch Secure Provisioning Platform for AWS IoT offers the industry’s first end-to-end security solution for IoT devices that connect to the Amazon Web Services (AWS) cloud. This platform was developed jointly with AWS to help designers to quickly and easily develop IoT devices that are in compliance with the new AWS security. This new state security mods states that a device must use mutual authentication with a remote server to be authorized on the AWS cloud. Incorporating Microchip’s preconfigured ECC508 secure crypto device and software kit into your system provides you with the simplest and most secure method to connect your design to the AWS IoT service.

All cloud-connected devices need a unique and protected identity that can be securely authenticated. There two main challenges to achieving this goal: providing a secure authentication method and managing the private keys in a large-scale production environment. The AWS-ECC508 meets these challenges by complying with AWS IoT just-in-time registration. While one-way authentication has commonly been used to secure systems, AWS IoT now offers mutual authentication between devices and the remote server. The AWS-ECC508 is an easy, flexible and cost-effective solution for adding this new, mutual authentication process to your device design. Simply solder the tamper-resistant AWS-ECC508 on your board and connect it to the host microcontroller (MCU) over I2C. The AWS-ECC508 is preconfigured to be automatically recognized by the AWS IoT service. All information is contained in a small, easy-to-deploy crypto companion device that is agnostic to surrounding hardware. This solution has been fully evaluated by AWS to comply with all of its security requirements.

Since the AWS-ECC508 generates unique device keys internally, it eliminates the need the need for IoT product developers to externally generate and securely manage databases of unique device keys amongst various custodians in their manufacturing and supply chains. This can be a costly, complex and risky procedure, involving the installation of Hardware Secure Modules (HSM) and frequent audits to assure trust. The AWS-ECC508 eliminates these costs and the complexity of assuring that secret information is kept secure during the manufacturing process.

The AWS Zero Touch Secure Provisioning Platform provides all that is needed in every stage of the life cycle of an AWS connected product development:

  1. AT88CKECC-AWS-XSTK complete starter kit for demonstration, evaluation and development.
  2. AWS IoT pre-configured ATECC508A-xxxAW-x for prototyping and pre-production pilots. The pre-configuration includes extensions for the product developer to experiment with choices of a Certificate Root, from self-signed to using third party Certificate Authorities (CA).
  3. A custom CPN AWS-ready ATECC508A fitted with internally generated unique keys chained to customer chosen certificate root and having signer certificates pre-registered to customers AWS account. The customer just needs to assemble the custom AWS-ECC508 device into the IoT product.

Source: AWS Secure Provisioning

Service-oriented architecture

A service-oriented architecture (SOA) is a style of software design where services are provided to the other components by application components, through a communication protocol over a network. The basic principles of service oriented architecture are independent of vendors, products and technologies.[1] A service is a discrete unit of functionality that can be accessed remotely and acted upon and updated independently, such as retrieving a credit card statement online.

A service has four properties according to one of many definitions of SOA:[2]

  1. It logically represents a business activity with a specified outcome.
  2. It is self-contained.
  3. It is a black box for its consumers.
  4. It may consist of other underlying services.[3]

Different services can be used in conjunction to provide the functionality of a large software application.[4] So far, the definition could be a definition of modular programming in the 1970s. Service-oriented architecture is less about how to modularize an application, and more about how to compose an application by integration of distributed, separately-maintained and deployed software components. It is enabled by technologies and standards that make it easier for components to communicate and cooperate over a network, especially an IP network.

Source: Service-oriented architecture – Wikipedia

EEPROM

Hi there, I wanted to know if the EEPROM has default values of 0, or of they are set to null.

If i wanted to initialize a value to the EEPROM, and increment it each time the arduino powers on, where would i place my initial
EEPROM.write(0,value);

would it be in the setup();?

basically ill be doing something within the loop like this

value = EEPROM.read(0);
value++;
EEPROM.write(0,value);

Source: EEPROM