A relatively new wrinkle in this second-sale doctrine relates to the software embedded in the product. Consider this scenario:
Bob purchases a computer second-hand from Bill. It has a full installation of Microsoft Windows, the Microsoft Office suite, and several video games. Bill purchased that software at the same time he purchased the computer new from the manufacturer. He intends to sell everything to Bob.
The issue at hand is that Bill purchased a computer (hardware device, physical object), but the software consists of a license to use intellectual property, not solely ownership of a physical object. Traditionally, these were linked, so for example purchasing an album from the music store meant having a license for private performance of the copyrighted work on the record. Public performance of the same required (and still does) separate licensing. Those licenses may or may not be transferrable, subject to the original contract terms.
As another answer addressed, you can always sell the physical medium. You can do anything with it you like, up to and including reverse engineering the design. What that answer failed to address, you may not be able to sell your rights under the initial license agreement (eg, Vernor v. Autodesk ). So, that version of Amy's Accounting software that Bill got as an educational edition may not be legally transferrable to Bob, who is neither a teacher nor a student, as required by Amy's license which does not permit transfer or resale.
A lot of software today is trying to evade this issue altogether, while improving their own cash flow, by moving to a subscription model, where you rent access to the software for a fixed period of time, rather than a perpetual license to use that particular version.
The main wrinkle here is firmware. What if, for example, the widget in question is say, a farm tractor. Can you sell the tractor? What about the license to the firmware/software? As far as I am aware, firmware licensing vs first sale doctrine has not been the subject of any court cases yet, but one could easily happen.