1

I am building a Smart Mirror for a school project and I need a way to give the user an interface where they can search and connect to a network.

Unfortunately, my Raspberry Pi stopped working (doesn’t boot for some reason) to overcome this, I am going to code and test on my Windows laptop, then run the code on another Raspberry Pi that I will be borrowing from elsewhere. I am quite new to Python, and I want to know if there is a way to use a universal module where I can test this on Windows while knowing that it will work on a Raspberry Pi.

Any help and suggestions are much appreciated,

Sid.

2 Answers 2

2

A lot of modules on windows will not work for raspbian because it is a debian derivative. So it could be that you have to change different modules you´ve been working on windows, because they are not running on raspbian. It is not always in general , it depends on the packages you use.

So i would prefer (i do the same, if i develope modules, which should be runnable on windows and linux machines) that you use VMs like VirtualBox https://www.virtualbox.org/ or VMware.

On this VM you install debian (because raspbian is a debian derivative) and then you develope your modules on this VM. If you finished with developing, so you can test it on a real hardware like Raspberry pi.

Example:

https://grantwinney.com/how-to-create-a-raspberry-pi-virtual-machine-vm-in-virtualbox/

Of course you cannot use the physically hardware of the raspberry pi like gpio´s. But you can write a software that is imitate the behaviour of the output of this gpio´s

2
  • Will the hardware related stuff work? I need to search available WiFi connections then let the user to connect to them
    – SidS
    Commented Jan 28, 2018 at 14:55
  • not all hardware will work, like gpio i mentioned before. But the wifi connection is on both the same so you can write the program for searching and connecting to available wifi´s. Related files /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf are the same on both.
    – bierschi
    Commented Jan 28, 2018 at 15:00
2

I have two laptops, and one of them runs Ubuntu. This is easier to me than running virtualbox, but I'm lazy.

A more affordable solution would be to purchase a used PC and put the Linux distribution of your choice. Debian and its offspring (like Ubuntu) would probably be the best because Raspian is also a Debian derivative.

I agree with @bierschi that the gpio's would be difficult to emulate, but you could write a library to simulate the gpio's in software. Besides, it sounds like you're taking input from a camera and sending the output to a screen. You might have to put a wrapper on a library meant for a USB camera to act like the Raspberry Pi camera if you're using that.

In fact, emulating a Raspberry Pi under Windows or Linux is such a neat idea that it has already been done! QEMU already does this! Disclaimer: I've never tried this for myself.

3
  • I’m using 2 way acrylic so I don’t really need to use a camera to display an artificial reflection
    – SidS
    Commented Jan 28, 2018 at 14:54
  • Then I misunderstood what you meant by a "smart mirror." But my answer still stands.
    – NomadMaker
    Commented Jan 28, 2018 at 14:58
  • Indeed, i have tried running a QEMU emulation, but the emulation was way too slow, I might run a Debian VM or install Debian on an old PC. Thanks!
    – SidS
    Commented Jan 28, 2018 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.