Running code on a controller that isn't plugged into my PC

Hello, I got the transceiver modules working, I had to just get the newest version of the IDE. The modules only work when plugged into my PC, and when I try to run the code when it's plugged into an external power supply running from a 9v battery, it doesn't work for because that's obviously not a port on my PC. How can I get my modules to send and receive information if not plugged directly into a com port?

Is the 9V battery one of these?

PP3

Those will not have the current capability required to supply the radio modules. Use a better supply.

You should not send the data so often. Put a delay() in your transmit loop. Like delay(200);

Read the forum guidelines to see how to properly post code and some information on how to get the most from this forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please go back and fix your original post by highlighting the code and clicking the </> in the menu bar.
code tags new

1 Like

Okay, i'm ordering a better power supply. This code is just a test run. How will the receiver receive if I don't have it plugged into my PC and I can't run the code?

What did you plan?

Once the code is loaded (flashed) onto the Arduino board, then it only needs power to run the code and the receiver will receive data. To view the data on serial monitor, you have to have a connection to a PC, but if you, for instance, have an LCD connected to the Arduino you can view the output on the LCD. An I2C enabled 1602 or 2004 LCD is pretty easy to interface and program.

Please fix your original post and post the code properly.

Well, the plan was to have some wireless battery or supply hooked up to the receiver end and microcontroller, which is way over on my door. The transmitter, which is hooked up to my PC on the other side of the room, will send an integer to the receiver which tells it to lock and unlock a latch lock.

Ohhhhh, that makes a lot of sense. I just need to get the code over on my pc, and run it, and it's instilled. Is that little button on the board possibly a reset for this flashed memory?

Sorry for the messed up post, and I can code and wire an LCD.

The little button resets the processor. It does nothing to the flash memory. Your program remains in flash, intact, and will run again after the processor is finished resetting.

Once you have the code in the IDE, upload the code to the Arduino via the serial port. The code than goes into flash memory.

Ah, I see. It's akin to unplugging and plugging back in the cord to the PC, just resets the program from the beginning. I think I should be good on questions for the next few weeks, i'll be ordering another set of 45 modules after I complete this project, so i'll be back.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.